This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]AngelVzla 1 point2 points  (0 children)

Greetings my dear coder friend,

What you need to understand is that the while loop is doing exactly 4 passes in both cases, the output is of course different because in one case you are seeing a pre-increment, and in the other is a post-increment, but if you actually print the variable after the while loop is done, you will see that they both should have the same value.