Ask your own question, for FREE!
Computer Science 11 Online
OpenStudy (anonymous):

Create a program base on the ff: Introduce int variables x and y and int* pointer variables p and q. Set x to 2, y to 8, p to the address of x, and q to the address of y. Then print the following information: (1) The address of x and the value of x. (2) The value of p and the value of *p. (3) The address of y and the value of y. (4) The value of q and the value of *q. (5) The address of p (not its contents!). (6) The address of q (not its contents!). C language again :D

OpenStudy (arnavguddu):

int main() { int x, y, *p, *q; x=2; y=8; p=&x; q=&y; printf("x addr=%u value=%d\n", &x, x); printf("p=%u *p=%d\n", p, *p); printf("y addr=%u value=%d\n", &y, y); printf("q=%u *q=%d\n", q, *q); printf("p addr=%u \n", &p); printf("q addr=%u \n", &q); }

OpenStudy (anonymous):

whats %u?

OpenStudy (arnavguddu):

%u prints the unsigned value.....address is always unsigned

OpenStudy (anonymous):

i see, btw, ill try the program first :D

OpenStudy (arnavguddu):

ok try it tell me

OpenStudy (anonymous):

it runs :D thank youuu.. please help me on my last problem :D

OpenStudy (arnavguddu):

ok....where's it

OpenStudy (arnavguddu):

????

OpenStudy (anonymous):

i posted it already :D

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
2 days ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
2 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!