Can someone help me with this C programming question Thanks

Can someone help me with this C programming question?!? Thanks!

Review code pointer.c and write your answer to the following questions in file 3_1.c: int a=5, b, *p=&a; Assuming that the lvalue of a, b, and p are: fb7c, fb78, fb74, write down the rvalue and lvalue of a, b, and p after each statement (answer to the first is shown as an example): p = &a;//a: (5, fb7c); b: (unknown, fb78); p: (fb7c, fb74) b = a * *p; *p = b + a; b = (*p)++; a = *p++; p = &b; a = *p; b = a++; p = p + 32;

Solution

b = a * *p; // a: (5,fb7c); b:(321900,fb78); p:(fb7c,fb74)
*p = b + a; // a: (5,fb7c); b:(321900,fb78); p:(4E971,fb74)
b = (*p)++; // a: (5,fb7c); b:(321906,fb78); p:(4E971,fb74)
a = *p++; // a: (321907,fb7c); b:(321906,fb78); p:(4E971,fb74)
p = &b; // a: (321907,fb7c); b:(321906,fb78); p:(321906,fb78)
a = *p; // a: (321906,fb7c); b:(321906,fb78); p:(321906,fb78)
b = a++; // a: (321906,fb7c); b:(321907,fb78); p:(321907,fb78)
p = p + 32; // a: (321906,fb7c); b:(321907,fb78); p:(Unknown,fb98)

Can someone help me with this C programming question?!? Thanks! Review code pointer.c and write your answer to the following questions in file 3_1.c: int a=5, b

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site