Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main( )
  4. {
  5. int a = 5;
  6. int *b;
  7. int **c;
  8. b = &a;
  9. c = &b;
  10. printf ("value of a = %d\n", a);
  11. printf ("value of a = %d\n", *(&a));
  12. printf ("value of a = %d\n", *b);
  13. printf ("value of a = %d\n", **c);
  14. printf ("value of b = address of a = %u\n", b);
  15. printf ("value of c = address of b = %u\n", c);
  16. printf ("address of a = %u\n", &a);
  17. printf ("address of a = %u\n", b);
  18. printf ("address of a = %u\n", *c);
  19. printf ("address of b = %u\n", &b);
  20. printf ("address of b = %u\n", c);
  21. printf ("address of c = %u\n", &c);
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement