What is the output of the following piece of program if the

What is the output of the following piece of program if the address of x, p, q and r in the memory is 225, 215, 205 and 230 respectively. in t x = 5; in t*p = &x; *p = 6; in t**q = &p; in t***r = &q; print f (\"%d/n\", *p); print f(\"%d/n\", *q); print f(\"%d/n\", **q); print f(\"%d/n\", **r); print f(\"%d/n, ***r);

Solution

You are wrong

1st print gives value 6

2nd print gives address of p 215

3rd print gives value in address stored in q i.e value of address p i.e 6

4th print gives address stored in r i.e address of q i.e 205

5th print gives value in address in r- i.e address of q- i.e address of p- i.e address of x- i.e value 6

 What is the output of the following piece of program if the address of x, p, q and r in the memory is 225, 215, 205 and 230 respectively. in t x = 5; in t*p =

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site