1.6.2 switch

A switch statement allows a single variable to be compared with several possible
constants. If the variable matches one of the constants, then a execution jump is made to that
point. A constant can not appear more than once, and there can only be one default expression.

If betty is 1, then two lines are printed: betty=1 and betty=2. If betty is 2, then only one line is
printed: betty=2. If betty=3, then only one line is printed: betty=3. If betty does not equal 1, 2,
or 3, then "Not sure." is printed.

1.6.3 while

The while statement provides an iterative loop.
Syntax:

while( expression) statement...

statement is executed repeatedly as long as expression is true. The test on expression
takes place before each execution of statement.
Examples:

1.6.4 do

statement is executed repeatedly as long as expression is true. The test on expression
takes place after each execution of statement.

Examples:

do {
betty++;
printf("%i",betty);
} while (betty<100);

1.6.5 for

The for statement allows for a controlled loop.

Syntax:

for(expression1 ; expression2 ; expression3 )statement...

expression1 is evaluated before the first iteration. After each iteration, expression3 is
evaluated. Both expression1 and expression3 may be ommited. If expression2 is ommited, it is
assumed to be 1. statement is executed repeatedly until the value of expression2 is 0. The test
on expression2 occurs before each execution of statement.

1.6.9 return

The return statement causes the current function to terminate. It can return a value to the
calling function. A return statement can not appear in a function whose return type is void. If
the value returned has a type different from that of the function's return type, then the value is
converted. Using the return statement without an expression creates an undefined result.
Reaching the } at the end of the function is the same as returning without an expression.