Review for loops. for (init; condition; increment) statement; is roughly equivalent to init; while (condition) { statement; increment; }
You should be able to find more information with a few seconds of research.
That is, i is incremented after the loop body executes, immediately before the condition is tested for the second time.