"increments" "decrements" after and before | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

"increments" "decrements" after and before

how this really go, I dont understand nothing

14th Jan 2017, 10:10 PM
Duperoy Dieuseul
Duperoy Dieuseul - avatar
2 Answers
+ 7
preincrement/predecrement (++x) has higher precedence, or priority, than postincrement/postdecrement (x++). So which you use changes when it operates. Ex: ++x will add/subtraxt 1 to x first and foremost. Then, all other operations around it will use the new value. x++ will use the old value for x until all other operations are done. Then, 1 is added/subtracted.
14th Jan 2017, 10:38 PM
Tamra
Tamra - avatar
0
thanks
14th Jan 2017, 11:01 PM
Duperoy Dieuseul
Duperoy Dieuseul - avatar