E-design
Advanced Member level 5
does it really matter if i use x++ or x=x+1?
I am not a C person and need some help understanding this.
Say we have two int declared: x=20 and y=35
x = x++ + y++ results in x = 56
Can anyone explain which one (my guess is y) got incremented and why the answer is not 57?
Does it matter if it was written as x = y++ + x++ or not
I am not a C person and need some help understanding this.
Say we have two int declared: x=20 and y=35
x = x++ + y++ results in x = 56
Can anyone explain which one (my guess is y) got incremented and why the answer is not 57?
Does it matter if it was written as x = y++ + x++ or not