0

what does this mean?

++i

12th Jun 2018, 6:43 PM
Getzael Pahua
Getzael Pahua - avatar
2 Réponses
+ 2
➡++i will increment the value of i, and then return the incremented value. i = 1; j = ++i; (i is 2, j is 2) ➡i++ will increment the value of i, but return the original value that i held before being incremented. i = 1; j = i++; (i is 2, j is 1)
12th Jun 2018, 6:46 PM
Sudarshan Rai
Sudarshan Rai - avatar
+ 1
Thank you so much👍🏻
12th Jun 2018, 6:58 PM
Getzael Pahua
Getzael Pahua - avatar