Confuse with y=x++ and y=(x++) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Confuse with y=x++ and y=(x++)

x=1; y=x++ and y=(x++) , are they the same result?

30th Jun 2017, 11:33 AM
Coolfly lew
Coolfly lew - avatar
2 Answers
+ 2
should be the same (tried with my netbeans)
30th Jun 2017, 11:53 AM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
0
In first case it will store the value of y and then it will change the value of y for next use
2nd Jul 2017, 5:54 AM
Divyansh Gupta