The first one. The reason is that it will loop when i
is 1,2 and 3 and will stop when i
is 4 as i<4
becomes false thus looping 3 times.
The second one is not right as it will loop 4 times,namely when i
is 0,1,2,3 and will stop when i
is 4 as i<=3
becomes false.
4
solved C programming Loops need explanation please [closed]