Topic Review Questions
Portfolio Review 2
<put your name here>
<put the date here>

1. What is a sentinel value? Provide an example (no coding necessary).


2. Which loop (while, do-while, or for) is the most appropriate for each of 
   the following cases, and why:

   A. A program will read in an response from the user, then keep 
      re-prompting the user if the response is invalid.
   B. A program will read in a list of values from the user and stop when
      a sentinel value is reached.
   C. A program will count down from 3 to 1 to start a race.

3. What types (int, string, char, float, etc.) can switch statements operate on?


4. In a switch statement, if I want multiple cases to all execute the same
   code, what is the most elegant way to do this (i.e., with the least amount of
   code)?


5. What are the key differences between each of the loop types: while, do-while,
   and for?