C++ Chapter 2
The ________ directive causes the contents of another file to be inserted into a program.
#include
What value will be assigned to the variable number by the following statement? int number = 7.8;
7
Which of the following will cause the next output to begin on a new line?
cout << endl;
The ________ is used to display information on the computer's screen.
cout object
You must have a(n) ________ for every variable you include in a program.
definition
The bool data type
has only two values: true and false.
#include <iostream> is an example of a(n)
preprocessor directive.
A C++ character literal is enclosed in ________ quotation marks, whereas a string literal is enclosed in ________ quotation marks.
single, double
C++ automatically places ________ at the end of a string literal.
the null terminator
The expression 5 % 2 evaluates to
1
The expression 5 / 2 evaluates to
2
Which of the following definitions will allow the variable total to hold floating-point values?
All of the above; float total, double total, auto total = 0.0;
Which of the following is/are valid C++ identifiers?
June_2010
________ are data items whose values cannot change while the program is running.
Literals
In a C++ program, two slash marks ( // ) indicate the beginning of
a comment.
Every C++ program must have
a function called main.