+ 1
[DUPLICATE] What is difference between x++ and ++x
3 Answers
+ 5
y = x++
first y=x and then x = x+1
y = ++x
first x = x+1 and then y = x
+ 2
Cout<<x++ //it will print x, because post-increment is done after the statement is complete
Cout<<++x//it will print x+1 because pre-increment is done first, and then statement second