+1

+ operator

Could you explain me please how does it works: int x =9; x+=++x; Console.Write (x);

10/10/2019 6:08:52 AM

Alexander Volsky

3 Answers

New Answer

+4

While it may be OK for challenge questions etc. in your own code try to avoid writing statements like: x+=++x

+3

X += ++X; means X = X + ++X; X = (9+1) + (1+9); X= 20

0

x+=++x means x plus x+1= 9+10=19?