Note that there is no semicolon after expr3.
12.
A for loop is also a pretest loop as it checks for the condition before it performs an
iteration.
13. It is also possible to execute more than one statement in the initialization expression and the
expr3 (increment/decrement).
of the parts of the for loop header, simply separate the statements with commas. For
instance,
for ( int i=1, j=2; i<10; i--) {…}
14. The following is the for loop as an infinite loop:
for (; ;)
15. A new feature of the for loop is that it is also able to iterate through collections without the
explicit use of iterators.
Do'stlaringiz bilan baham: |