+ 1
"++x" vs. "x++"
What is difference between "++x" and "x++" in C++?
5 Respostas
+ 5
Refer to this for a reference
https://code.sololearn.com/W9BBJnbCBEv7/?ref=app
+ 9
Just search x++ or increment in question search bar you will get a couple of answers from them
https://code.sololearn.com/W7X805sc4DPC/?ref=app
+ 7
https://www.sololearn.com/discuss/77467/?ref=app
https://www.sololearn.com/discuss/245871/?ref=app
https://www.sololearn.com/discuss/331665/?ref=app
+ 4
https://www.sololearn.com/discuss/217288/?ref=app
https://www.sololearn.com/discuss/266300/?ref=app
https://www.sololearn.com/discuss/336732/?ref=app
https://www.sololearn.com/discuss/160327/?ref=app
https://www.sololearn.com/discuss/208414/?ref=app
+ 4
----------------------------------------------------------------
y=++x
1) x=x+1
2)y=x
So if x=1 then y=2;
----------------------------------------------------------------
y=x++
1) y=x
2) x=x+1
So if x=1 then y=1;
----------------------------------------------------------------