A C++ program is a collection of ________.
functions
Every C++ program has a function called ____.
main
A single-line comment starts with the pair of symbols __ anywhere in the line.
//
Multi-line comments are enclosed between __ and __.
/,/
True or False:
The compiler ignores comments.
true
________ words cannot be used as identifiers in a program.
reserved
True or False:
All reserved words in C++ consist of lowercase letters.
true
In C++, ___________ are names of things.
identifiers
A C++ __________ consists of letters, digits, and underscores and must begin with a letter or an underscore.
identifier
_________ include blanks, tabs, and newline characters.
Whitespaces
A ____ ____ is a set of values together with a set of allowed operations.
data type
C++ data types fall into the following three categories: _, _, and ___.
simple, structured, pointers
There are three categories of simple data: _, _-_, and _______.
integral, floating-point, and enumeration.
Integral data types are classified into the following categories: c_, s_, i_, l_, b_, unsigned c_, unsigned s_, unsigned i_, unsigned l_, l_ l_, and unsigned l_ l___.
char, short, int, long, bool, unsigned char, unsigned short, unsigned int, unsigned long, long long, unsigned long long
The values belonging to int data type are -2,147,483,648 or -2^31 to 2,147,483,647 or ____.
2^31
The data type ____ has only two values: true and false
bool
The most common character sets are ASCII, which has 128 values, and ______ which has 256 values.
EBCDIC
The ________ _______ of a character is its preset number in the character data set.
collating sequence
C++ provides three data types to manipulate decimal numbers: , _, and ___ ___.
float, double, long double
The data type _____ is used in C++ to represent any real number between -3.4 * 10^38 and 3.4 * 10^38
float
The data type ______ is used in C++ to represent any real number between -1.7 * 10^308 and 1.7 * 10^308. The memory allocated for a value of this data type is eight bytes.
double
True or False:
The arithmetic operators in C++ are addition (+), subtraction (-), multiplication (*), division (/), and modulus (%).
true
The modulus operator, %, takes only _______ operands.
integer
True or False:
Arithmetic expressions are evaluated using the precedence rules and the associativity of the arithmetic operators.
true
True or False:
All operands in an integral expression, or integer expression, are integers, and all operands in a floating-point expression are decimal numbers.
true
True or False:
A mixed expression is an expression that consists of both integers and decimal numbers.
true
True or False:
When evaluating an operator in an expression, an integer is converted to a floating-point number, with a decimal part of 0, only if the operator has mixed operands.
true
You can use the ____ operator to explicitly convert values from one data type to another.
cast
A ______ is a sequence of zero or more characters.
string
_______ in C++ are enclosed in double quotation marks.
strings
True or False:
A string containing no characters is called a null or empty string.
true
Every character in a string has a relative position in the string. The position of the first character is ____, the position of the second character is 1, and so on.
zero, 0
The ______ of a string is the number of characters in it.
length
During program execution, the contents of a ____ _______ cannot be changed.
named constant
A named constant is declared by using the reserved word _____.
const
True or False:
A named constant must be initialized when it is declared.
true
True or False:
All variables must be declared before they can be used.
true
True or False:
C++ does not automatically initialize variables.
true
True or False:
Every variable has a name, a value, a data type, and a size.
true
True or False:
When a new value is assigned to a variable, the old value is lost.
true
True or False:
Only an assignment statement or an input (read) statement can change the value of a variable.
true
In C++, >> is called the ____________________.
stream extraction operator
____ from the standard input device is accomplished by using cin and the stream extraction operator >>.
input
True or False:
When data is input in a program, the data items, such as numbers, are usually separated by blanks, lines, or tabs.
true
In C++, << is called the ____________________.
stream insertion operator
Output of the program to the standard output device is accomplished by using ___ and the stream insertion operator <<.
cout
The manipulator ____ positions the insertion point at the beginning of the next line on an output device.
endl
True or False
Outputting or accessing the value of a variable in an expression does not destroy or modify the contents of the variable.
true
The character _ is called the escape character.
\
The sequence __ is called the newline escape sequence.
\n
All preprocessor commands start with the symbol _.
#
#True or False
The preprocessor commands are processed by the preprocessor before the program goes through the compiler.
true
iostream
True or False:
To use cin and cout, the program must include the header file iostream and either include the statement using namespace std; or refer to these identifiers as std::cin and std::cout.
true
All C++ statements end with a _________. In C++, this symbol is called the statement terminator.
semicolon, ;
A C++ system has three components:
environment, language, and the standard libraries.
Standard libraries are not part of the C++ language. They contain _________ to perform operations, such as mathematical operations.
functions
A file containing a C++ program usually ends with the extension .___.
.cpp
True or False:
Prompt lines are executable statements that tell the user what to do.
true
Corresponding to the five arithmetic operators +, -, *, /, and %. C++ provides five compound operators: __, __, __, __, and __, respectively.
+= -= *= /= %=