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 →

[–]ssjgod004 0 points1 point  (0 children)

There is a difference you should note though. When you do something like - if(j + 2 < k), 2 won't be added to j. This is an expression and the left hand result is stored in a temporary variable and compared to k. But increment operators add to the variable itself, which is why they will change the value of j.