Exam II Review

  1. What is meant by the phrase "flow control" or "flow of control"?
  2. What is the difference between repetition and selection?
  3. Write a relational expression to express the condition a person is older than 50 or has been employed by the company for at least 5 years.
  4. Write an if statement for the following condition: If income is greater than 50000 set the tax rate to 25%, else set the tax rate to 10%.
  5. The switch statement uses the four keywords switch, case, default and break.  What is the purpose of each of these keywords?  Which keywords are required and which are optional?
  6. How would you decide between the following selection statements?
  7. What is a pretest loop?
  8. What is a posttest loop?
  9. Which C++ loops are pretest and which are posttest?
  10. What is a fixed count loop?
  11. What is a variable count loop?
  12. List some common uses for the following  repetition structures.
  13. Write a for loop that prints out the numbers from 0 to 100 by 2.
  14. What is a counter?
  15. What is an accumulator?
  16. What is a skip guard plan?
  17. What is a sentinel controlled loop?
  18. What is data validation?