0
What is the point of using x++? Why would you not just use x+1, if they have the same result?
3 odpowiedzi
+ 4
x++ is not equivalent to x + 1, but to x = x + 1. So x++ is shorter.
0
because there's some distance. ++ is an one processor operation while += loads 1 at first and then performs addition.
0
Mirrors the fact that incrementing has a special machine instruction.