Name_______________________ Login___________________SID________

 

CS 010: Introduction to Computer Science I

Quiz 1: 10 minutes

 

  1. Which of the following is NOT considered hardware?

a.      Operating System

b.      CPU

c.      RAM

d.      keyboard

 

  1. Which estimate of the number of computers in this room is closest?

a.      0

b.      1

c.      10

d.      100

e.      1000

f.        10000

 

  1. Assemblers came before compilers in the evolution of computer programming.

a.      TRUE

b.      FALSE

 

  1. All statements in C++ must end with a semicolon.

a.      TRUE

b.      FALSE

 

  1. What is output to standard output (the monitor) by the following statement? In other words, what will actually be visible on the monitor?

 

int count = 10;

cout << count;

 

    1. count
    2. “count”
    3. 10
    4. “10”

 

  1. What is output to standard output by the following statements?

 

int count = 10;

cout << “count”;

 

    1. count
    2. “count”
    3. 10
    4. “10”

 


  1. Which of the following is an example of a literal?
    1. 10
    2. 4.5
    3. “count”
    4. count
    5. All except D are examples of literals
    6. None of the above are examples of literals

 

  1. All expressions in C++ must end with a semicolon?
    1. TRUE
    2. FALSE

 

  1. What is output to standard output by the following statement?

 

cout << 5 + 10 * 20;

 

    1. 5 + 10 * 20
    2. 205
    3. 300
    4. This is not a legal statement in C++.

 

  1. What will be stored in the variable called result after the following statements have executed? (Hint: 10 and 20 are both integers)

 

double result;

result = 10 / 20;

 

    1. 0.5
    2. 0.0
    3. 10
    4. 1.0