1. The _________ causes a program to wait until information is typed at the keyboard and the Enter key is pressed.
A. Input device
B. cin object
C. cout object
D. Preprocessor
E. None of the above


2. The ______ operator always follows the cin object, and the ______ operator follows the cout object.
A. binary, unary
B. conditional, binary
C. >>, <<
D. <<, >>
E. None of the above


3. In any program that uses the cin object, you must #include the ___________.
A. compiler
B. iostream.h header file
C. linker
D. >> and << operators
E. None of the above


4. True/False: The cin object can be used to output data to the monitor.
A. True
B. False


5. The character array Company[12] can hold
A. Twelve characters
B. Thirteen characters
C. Eleven characters and the null terminator
D. Twelve characters and the null terminator
E. None of the above


6. True/False: A limitation of the C++ language is its inability to construct complex mathematical expressions.
A. True
B. False


7. A programming statement that can be evaluated to a value is called a(n):
A. Expression
B. Line
C. Operator
D. Operation
E. None of the above


8. True/False: It is a good idea to put parentheses around an expression that you send to the cout object.
A. True
B. False


9. If two arithmetic operators in an expression have the same precedence, they work according to their:
A. Prioritization factor
B. Associativity
C. Outcome assessment
D. Data types
E. None of the above


10. _________ can override the rules of operator precedence.
A. Associativity
B. Parentheses
C. Operands
D. Nothing
E. None of the above


11. True/False: When an operator's operands are of different data types, C++ will automatically convert them to the same data type.
A. True
B. False


12. When the final value of an expression is assigned to a variable, it will be converted to:
A. The smallest possible data type
B. The largest possible data type
C. The data type of the variable
D. The data type of the expression
E. None of the above


13. When a variable is assigned a number that is too large for its data type, it:
A. underflows
B. overflows
C. reverses polarity
D. exceeds expectations
E. None of the above


14. The ________ member function of the cout object is used to establish a field width for the value immediately following it.
A. cin
B. setField()
C. setw()
D. iomanip.h
E. None of the above


15. True/False: When the ios::fixed flag is set, the value specified by the setprecision manipulator will be the number of digits to appear after the decimal point.
A. True
B. False


16. The format flag, ____________, causes the field to be left-justified with padding spaces printed to the right.
A. ios::fixed
B. ios::right
C. ios::left
D. ios::dec
E. None of these


17. The format flag, ____________, causes all subsequent numbers to be displayed in scientific notation.
A. ios::fixed
B. ios::right
C. ios::left
D. ios::dec
E. None of these


18. The cin member function, __________, reads an entire line of text, until the [Enter] key is pressed.
A. >>
B. getline()
C. line()
D. input()
E. None of these


19. True/False: The only difference between the get function and the >> operator is that get reads the first character typed, even if it is a space, tab, or the [Enter] key.
A. True
B. False


20. To use the rand() function, you must #include the _______ header file in your program.
A. iostream.h
B. iomanip.h
C. iorand.h
D. stdlib.h
E. None of these



This is the end of the test. When you have completed all the questions and reviewed your answers, press the button below to grade the test. (this feature has been disabled).