Actually, the outer loop will run first. On the first iteration of the outer loop, the inner loop will run, and keep running, until it terminates. Then, the next iteration of the outer loop will run, and on this iteration, the inner loop will run, and keep running, until it terminates. Then, the next iteration of the outer loop will run, ..., until the outer loop itself terminates. This applies whether the loops are for loops, while loops, or do while loops.
Paul help! wrote:1) do inner 'if' run before outer 'ifs'?
Likewise, the outer if statement will run before the inner if statement. It is simply a consequence of the flow of control proceeding statement by statement from the "top" to the "bottom" except where this flow is modified by control statements such as if statements and loops.