+ 1

Whats the difference between ++i and i++?

17th Apr 2016, 9:22 AM
Godfrey Wu
Godfrey Wu - avatar
3 Antworten
+ 1
++i means first increment by one then assign the value & i++ means first assign the value then increment by one.
7th May 2016, 9:36 AM
Govind
+ 1
++i means pre-increment and i++ means post-increment
22nd Jun 2016, 3:53 PM
gandhiyash
0
1) Prefix form y = ++x is equivalent to x = x + 1 y =x 2) Postfix form y = x++ is equivalent to y = x x = x + 1
25th Jun 2016, 11:46 PM
Aamir Memon
Aamir Memon - avatar