Tutorials - C++ Programming Quiz on Conditional Statements
C++ Programming Quiz: If statements
If you didn't do as well as you would have liked, be sure to read through
Cprogramming.com's tutorial on if statments in C and C++. Otherwise, congratulations!
1. Which of the following is true?
A. 1
B. 66
C. .1
D. -1 E. All of the above
2. Which of the following is the boolean operator for logical-and?
A. & B. &&
C. |
D. |&
3. Evaluate !(1 && !(0 || 1)). A. True
B. False
C. Unevaluatable
4. Which of the following shows the correct syntax for an if statement?
A. if expression
B. if { expression C. if ( expression )
D. expression if
|
|
QuizNext lesson: Lesson 3, loops