Chapter Two Quiz
This is used to mark the end of a complete C++ programming statement.
semicolon
Escape sequences are always stored internally as a single character.
True
Which one of the following would be an illegal variable name?
3dGraph (NOTE: an illegal variable is one which starts with a number digit!)
Assume that a program has the following string object definition: string name; Which of the following statements correctly assigns a string literal to the string object?
name = Jane;
In memory, C++ automatically places a ________ at the end of string literals.
null terminator
A statement that starts with a # is called a:
preprocessor directive
In a C++ program, two slash marks ( // ) indicate:
the beginning of a comment
A variable called "average" should be declared as an integer data type because it will probably hold data that contains decimal places.
False
Which character signifies the beginning of an escape sequence?
\
A variable whose value can be either true or false is of this data type.
bool