If the result of the expression does not match any case clause, then the default statement body is executed. After a statement body is executed, the next statement body is executed, and so forth. For example, if the expression matches value 1, statement body 1 is executed, followed by statement body 2, etc. To prevent this from happening, you probably want to put a break statement at the end of each statement body. Break causes the switch statement to be terminated.
Execution continues with the next statement after the switch statement.
Iteration Statements, or Loops An iteration statement, or a loop , is very useful. It causes a piece of code to be executed repeatedly. There can be many kinds of loops. As long as the expression is non-zero, the statement body is executed. Thus, something in the statement body should modify one of the variables in the expression, or else you'll be stuck in an infinite loop.