2. What are iteration statements?
An iteration statement, or loop, is a way
of repeating a statement, known as loop
body, a number of times until some
condition is satisfied.
We have following types of iteration
statements in C:
while loop
do-while loop
for loop
Set of
instructions
condition
True
False
6. do – while loop
Syntax:
initialization;
do {
…block of code…
increment/decrement;
} while (test_condition);
condition
True
Exit from loop
Loop body
False
8. for loop
Exit from loopcondition
False
True
Loop body
initialization
Syntax:
for ( initialization; test_condition; update_expression ) {
…block of code…
}
Update
Expression
10. What are jumping statements?
Jump statements can be used to modify the behavior of conditional and iterative
statements.
Some jump statements provided by C are:
o continue
o break
o goto
o return