0
Different between x++ and x=x++
What is the diffrent between x++ and x=x++ when x=1
2 Answers
0
No difference they are same, x++ increments by 1 after execution of statement however
x=x++
increments after assignment of value. Since memory address (Lvalue) is same so they are same both ways.
- 1
x++ simply increments the value of x by 1. (value is not stored)
x=x++ In this, the value is first incremented and assigned to itself which means the value is stored in the memory referenced by x.