Exam II Review
- What is meant by the phrase "flow control" or "flow of control"?
- What is the difference between repetition and selection?
- 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.
- 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%.
- 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?
- How would you decide between the following selection statements?
- if statement
- if-else statement
- if-else chain
- switch statement
- What is a pretest loop?
- What is a posttest loop?
- Which C++ loops are pretest and which are posttest?
- What is a fixed count loop?
- What is a variable count loop?
- List some common uses for the following repetition structures.
- while loop
- for loop
- do while loop
- Write a for loop that prints out the numbers from 0 to 100 by 2.
- What is a counter?
- What is an accumulator?
- What is a skip guard plan?
- What is a sentinel controlled loop?
- What is data validation?