Dear all
Please see this part of code:
int p=0,q=0;
q= ++p + ++p;

It is expected for q to be 3 after the expression, 1+2..
But it becomes 4,2+2..
Could not understand the background logic of the compiler
If you say :
q= ++p + 0 + ++p;
Or:
q= ++p + 1 + ++p;
In both forms q becomes 4..
Any one has any idea about the logic of this calculation?
Thank you all