int main()
{
int x=5,*p;
p=&x;
*p=x++ + *p;
printf ("%d %d",x,*p);
}
We have this program
now
here *p= 5++ + (*p) -> *p= 5 + 5 =10
so x location is 10
and then the postfix x++= 10+1=11
so output is 11 11
int main()
{
int x=5,*p;
p=&x;
*p=x++ + 5;
printf ("%d %d",x,*p);
}
Now in the same question we add a constant 5 , Here x is not incrementing later .
*p= x++ + 5;
*p= 5+5=10
output 10 10 , when x is not taking the postfix increment ???