Greetings, I have analyzed the code below a numerous times, but I was end up failing in understanding it completely.
This supposedly print out
And here is what I see:
v = 0, z = 4, then it prints out: 0 4
v = 1 (since it is v++ in the first for loop), z = 3 (same concept same the first for loop), and now that v == 1, add one (v++) to v = 1, then it prints out: 2 3
v = 3 but z = 2 so nothing happens because z does not satisfy z > 2 so it does not print anything out.
For every single value of v , inner FOR loop is called twice.
they form nested loops (loops within loops).
Joined: Dec 11, 2011
Nitin, I really tried......... but I still do not understand. I appreciate your contribution and if you don't feel like explaining it to me anymore, then don't and I will still thank you.
But if you don't mind helping me out, then these are what I do not get:
First of all, let me clarify, inner FOR loop is the second loop right?
If so or not, how is it called twice? That part I really don't understand.