January 13th, 2013, 03:37 AM
A for statement comprises four parts:
- 1 Initial expression,
- 2 loop condition expression,
- 3 loop body
- 4 iteration expression
And operates thus:
do 1 then while 2 do 3 then 4
Any of 1,2,3 or 4 may be empty (or null) statements. A null statement is just a semi-colon on its own.
An expression is implicitly "true" is it is non-zero.
That is all you need to know to work out the answer to both.