6. We can also control the operation of a loop with
break and continue statements, with and
without labels. The break statement immediately terminates the loop code block whereas
the continue statement skips any remaining code in the block and continues with the next
loop iteration.
7.
A variable/iterator/counter variable
that is declared in a for statement can be referred to only
inside the loop.
8. The following is the bare minimum for a loop (with missing parts):
for (;;){ }
9. These loops are counter-controlled loops. We can also write user-controlled loops (i.e., that
allow the user to decide the number of iterations).
10. The first line of the for loop is also known as a
loop header.
11.
Do'stlaringiz bilan baham: