Question 5-1. What statements are generally used for conditional branching?
Question 5-2. True or false: an if
statement’s condition must evaluate to an expression.
Question 5-3. Why should you use braces when there is only one statement following the if
?
Question 5-4. What kind of expression can be placed in a switch
statement?
Question 5-5. True or false: you can never fall through in a switch
statement.
Question 5-6. Name two uses of goto
.
Question 5-7. What is the difference between while
and do…while
?
Question 5-8. What are the three parts of a for
loop header?
Question 5-9. What does the keyword continue
do?
Question 5-10. What are two ways to create a loop that never ends until you hit a break
statement?