I have to find out what would be the output to the following. I believe the output would be 5656 but I wanted to see if I might have overlooked something.
int x=5, y=6, *p=&x, *q=&y;
x=*q;
*p=*q+2;
*q=x;
printf("%d %d %d %d\n", x, y, *p, *q);
int x=5, y=6, *p=&x, *q=&y;
x=*q;
*p=*q+2;
*q=x;
printf("%d %d %d %d\n", x, y, *p, *q);
Comment