Anda di halaman 1dari 1

AAPP005-3-2 Page 1 of 1

Lab
Pointers

Question 1
A C program contains the following statements.
char u, v = A;
char *pu, *pv = &v;

*pv = v + 1;
u = *pv + 1;
pu = &u;

Suppose each character occupies 1 byte of memory. If the value assigned to u is stored in
(hexadecimal) address F8C and the value assigned to v is stored in address F8D, then

a) What value is represented by &v?


b) What value is assigned to pv?
c) What value is represented by *pv?
d) What value is assigned to u?
e) What value is represented by &u?
f) What value is assigned to pu?
g) What value is represented by *pu?

Diploma Part 2 Asia-Pacific Institute of Information Technology

Anda mungkin juga menyukai