Initially, i is 0, i>4 is false, So the conditional operator return true, and the body of the loop is executed.
In the next iteration,
i is 1 , i>4 is false, so body executes and i=1 is printed, similarly
when i is 4, i>4 is false, so i=4 is printed, next
i is 5, i>4 is true, so conditional operator returns false, and the loop terminates!
Hope this one troubled your mind a little :-)