+ 2
What is the difference between i+1 And i++
6 Respuestas
+ 4
i++: Return i and increment i after this expression.
i + 1: Return i + 1 without changing i.
+ 3
"i + 1" doesn't change the value of i and returns the calculated value.
The another changes and returns.
+ 2
i=i+1 is same as i++
+ 2
Immortal🌼 Oh I see, it's similar to pre increment.
0
++i is in general not the same as i = i + 1; as the first is an expression with value i+1 and the later is an statement. But ++i; and i=i+1; are the same