Electrical
and Computer Engineering
The break and
continue
Statements
•The break statement causes an immediate exit from the innermost switch, while, do-while, or for statement in which it appears.
•If break is in a loop that is nested inside
another loop, control exits the inner loop
but not the other.
•A continue statement terminates only the current iteration of a loop (not the whole loop).