-
A statement that begins with the symbol // is the beginning of comments.
-
A statment that begins with the # symbol is called a preprocessor directive.
-
Which of the following is a valid identifier name in C++?
-
three_stooges
-
3Stooges
-
3_stooges
-
the 3 stooges
-
-
What is used to terminate a statement in C++?
- A colon.
- A semi-colon.
- A pound sign.
- The percent sign.
-
What happens if you use a C++ keyword as an identifier name?
- You may get a logic error.
- The program will not compile.
- The program will crash.
- You will get a linked error.
-
Every complete C++ program must have a(n)
- function named
main
- error handler
-
cout
statement -
#include <iostream>
statement
- function named
-
What will the following code display?
cout << "Larry"; cout << "Moe"; cout << "Curly"; LarryMoeCurly
-
The C++ main function must return _____ when the program terminates successfully.
- 0
- "Success"
- no value
- -1
-
Which of the following are valid operators in C++?
- +
- *
- >>
- <<
- All of the above are valid operators.
-
Beware of variables vs strings.