+ 1

"++x" vs. "x++"

What is difference between "++x" and "x++" in C++?

13th May 2017, 3:35 PM
Talha Bin Tareque
Talha Bin Tareque - avatar
5 Respostas
+ 5
13th May 2017, 4:01 PM
Siddharth Saraf
+ 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
13th May 2017, 3:39 PM
Utkαrsh
Utkαrsh - avatar
13th May 2017, 3:38 PM
Welliton Malta
Welliton Malta - avatar
+ 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; ----------------------------------------------------------------
13th May 2017, 4:21 PM
Yasiru Nayanajith
Yasiru Nayanajith - avatar