anonymous
  • 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
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
schrodinger
  • schrodinger
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
arnavguddu
  • 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); }
anonymous
  • anonymous
whats %u?
arnavguddu
  • arnavguddu
%u prints the unsigned value.....address is always unsigned

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
i see, btw, ill try the program first :D
arnavguddu
  • arnavguddu
ok try it tell me
anonymous
  • anonymous
it runs :D thank youuu.. please help me on my last problem :D
arnavguddu
  • arnavguddu
ok....where's it
arnavguddu
  • arnavguddu
????
anonymous
  • anonymous
i posted it already :D

Looking for something else?

Not the answer you are looking for? Search for more explanations.