J
jim
Hello,
let say we have;
1) i++; /* use i and increment by one */
2) ++i; /* increment i by one and use it */
3) i += 1;
4) i = i+1;
result (for value of i) of all 4 will be same; could anyone tell
differences among them from any perspectives?
I heard we'd better use 2) over 1). And 1) is faster than 3) or 4).
Thanks in advance,
let say we have;
1) i++; /* use i and increment by one */
2) ++i; /* increment i by one and use it */
3) i += 1;
4) i = i+1;
result (for value of i) of all 4 will be same; could anyone tell
differences among them from any perspectives?
I heard we'd better use 2) over 1). And 1) is faster than 3) or 4).
Thanks in advance,