C++ Quiz 2 GRADE A+ QUESTION AND ANSWER
In a C++ program, two slash marks ( // ) indicate:
Select one:
a. The end of a statement
b. The beginning of a comment
c. The end of the program
d. The beginning of a block of code
e. None of these - (correct answer)b. ( The beginning of a comment)
A statement that starts with a # symbol is called a:
Select one:
a. Comment
b. Function
c. Preprocessor directive
d. Key word
e. None of these - (correct answer)c. (Preprocessor directive )
For every opening brace in a C++ program, there must be a:
Select one:
a. String literal
b. Function
c. Variable
d. Closing brace
e. None of these - (correct answer)d. ( Closing brace)
The ________ is/are used to display information on the computer's screen.
, Select one:
a. Opening and closing braces
b. Opening and closing quotation marks
c. cout object
d. Backslash
e. None of these - (correct answer)c. (cout object )
The ________ causes the contents of another file to be inserted into a program.
Select one:
a. Backslash
b. Pound sign
c. Semicolon
d. #include directive
e. None of these - (correct answer)d. (#include directive )
________ represent storage locations in the computer's memory.
Select one:
a. Literals
b. Variables
c. Comments
d. Integers
e. None of these - (correct answer)b. (Variables )
These are data items whose values do not change while the program is running.
Select one:
a. Literals
b. Variables
In a C++ program, two slash marks ( // ) indicate:
Select one:
a. The end of a statement
b. The beginning of a comment
c. The end of the program
d. The beginning of a block of code
e. None of these - (correct answer)b. ( The beginning of a comment)
A statement that starts with a # symbol is called a:
Select one:
a. Comment
b. Function
c. Preprocessor directive
d. Key word
e. None of these - (correct answer)c. (Preprocessor directive )
For every opening brace in a C++ program, there must be a:
Select one:
a. String literal
b. Function
c. Variable
d. Closing brace
e. None of these - (correct answer)d. ( Closing brace)
The ________ is/are used to display information on the computer's screen.
, Select one:
a. Opening and closing braces
b. Opening and closing quotation marks
c. cout object
d. Backslash
e. None of these - (correct answer)c. (cout object )
The ________ causes the contents of another file to be inserted into a program.
Select one:
a. Backslash
b. Pound sign
c. Semicolon
d. #include directive
e. None of these - (correct answer)d. (#include directive )
________ represent storage locations in the computer's memory.
Select one:
a. Literals
b. Variables
c. Comments
d. Integers
e. None of these - (correct answer)b. (Variables )
These are data items whose values do not change while the program is running.
Select one:
a. Literals
b. Variables