many programs are complicated and comments help explain what is going on
question
the line in the program that begins with a # is called a
answer
preprocessor directive
question
Reads your program before it is compiled and only executes those lines beginning with the # symbol
answer
prepocessor directive
question
"sets up" your source code for the compiler
answer
preprocessor directive
question
C++ uses ___ to organize the names of program entities.
answer
namespaces
question
A group of one or more programming statements that collectively has a name
answer
function
question
The character escape sequence to force the cursor to go to the next line is:
answer
n
question
The character escape sequence to force the cursor to advance forward to the next tab setting is:
answer
t
question
The character escape sequence to represent a single quote is:
answer
'
question
The character escape sequence to represent a double quote is:
answer
"
question
How many spaces printed out by this statement: cout << "abcndeftghinjkl" << endl << endl << "mnonnpqrn";
answer
6
question
How many bytes are needed to store: 'n' ?
answer
1
question
How many bytes are needed to store: "n" ?
answer
2
question
How many bytes are needed to store: 'n' ?
answer
1
question
How many bytes are needed to store: "n", ?
answer
2
question
How many bytes are needed to store: "n" ?
answer
3
question
How many bytes are needed to store: "" ?
answer
1
question
What's the difference in UNICODE value between 'E' and 'A'? (consult a table of UNICODE values):
answer
4
question
What's the difference in UNICODE value between 'e' and 'a'? (consult a table of UNICODE values):
answer
4
question
What's the difference in UNICODE value between '3' and '0'? (consult a table of UNICODE values):
answer
3
question
What's the difference in UNICODE value between '6' and '0'? (consult a table of UNICODE values):
answer
6
question
Does this line contain a valid comment?
int twoPi = 3.14459; /* holds the value of two times pi */
answer
Yes
question
Does this line contain a valid comment?
/* This is a //*// First Rate Program //*//
answer
No
question
Write a character literal representing the (upper case) letter A .
answer
'A'
question
Write a character literal representing a comma.
answer
','
question
Write a character literal representing the digit 1 .
answer
'1'
question
Write a literal representing the character whose ASCII value is 65 .
answer
65
question
Write a literal representing the largest character value . Suppose we are using unsigned one-byte characters .
answer
255
question
Declare a character variable named c .
answer
char c;
question
Write the necessary preprocessor directive to enable the use of the C++ string class .
answer
#include
question
Declare a string variable named mailingAddress .
answer
string mailingAddress;
question
Declare 3 string variables named winner , placed and show .
answer
string winner, placed, show;
question
Declare a string variable named empty and initialize it to the empty string .
answer
string empty;
question
Declare a string variable named oneSpace and initialize it to a string consisting of a single space.
answer
string oneSpace;
oneSpace = " ";
question
Assume that message is a string variable . Write a statement to display its value on standard output .
answer
cout << message ;
question
Assume that word is a string variable . Write a statement to display the message "Today's Word-Of-The-Day is: " followed by the value of word on standard output .
answer
cout << "Today's Word-Of-The-Day is: " << word ;
question
Expressions that have a true or false value
answer
Boolean expressions
question
Write a literal representing the false value in C++.
answer
false
question
Write a literal representing the true value .
answer
true
question
Declare a variable isACustomer , suitable for representing a true or false value .
answer
bool isACustomer;
question
Declare a variable hasPassedTest , and initialize it to true .
answer
bool hasPassedTest;
hasPassedTest = true;
question
useful for evaluating conditions that are either true or false
answer
bool variables
question
Declare and initialize the following variables :
A variable monthOfYear , initialized to the value 11
A variable companyRevenue , initialized to the value 5666777
A variable firstClassTicketPrice , initialized to the value 6000
A variable totalPopulation , initialized to the value 1222333