++ -- post and pre# | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

++ -- post and pre#

I don't understand this operator! pLZzz fully explain it. what happens when this is in local variable and what use in loop......

18th Oct 2017, 1:31 PM
Muhammad Belal
Muhammad Belal - avatar
2 Answers
+ 1
a=5; ++a; // a=6 ------------ a=3; b=2; c=a++ + b= 3+2=5; // a=4 The same for -- but obviously decreasing
18th Oct 2017, 2:12 PM
Daniel
Daniel - avatar
18th Oct 2017, 10:52 PM
Baptiste E. Prunier
Baptiste E. Prunier - avatar