311 views

1 Answer

Best answer
4 votes
4 votes
++, * have same precedence but associativity is from Left to Right.

So ++*p++ ====> first p++ would be evaulated it nothing but making p to point to 43 as it was earlier pointing to 12 nut since it is postfix increment, it's effect won't be seen in the assignment statement to c.

So p still has address of 12 and ++*p is assigned to c i.e 13 is assigned to c.

Now after this c assignment line gets executed the post increment operation reflects making p to point ot next element i.e 43

 

So answer is 13,43
selected by

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
1 answer
4
altamash asked Apr 12, 2019
324 views
int main();{int a,*b, c, *d, e;a=10;b=&a;c=&b;d=&c;e=&d;print f(“a=%d b=%u c=%u d=%u e=%u e=%u\n”, a,b,c,d,e);print f(“ %d %d %d \n”,a,a+*b, c+ *d+, e);return 0...