fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. // int x = 2;
  6. // int *p;
  7. // int x = NULL;
  8. // p = &x;
  9. // printf("%d", *p);
  10.  
  11. // int x = 2;
  12. // int *p;
  13. // p = &x;
  14. // printf("%d, %d, %x, %x, %x", *p, x, p, &x, &p);
  15.  
  16. int a = 50;
  17. int *ptr = &a;
  18. int *q = ptr;
  19.  
  20. printf("%d, %d, %x, %x, %x, %d", a, *ptr, ptr, &a, q, *q);
  21.  
  22. // int a = 50;
  23. // int *ptr = &a;
  24. // int **q = &ptr;
  25. // printf("%d, %d, %x, %x, %x, %d", a, *ptr, ptr, &a, *q, *(*q));
  26.  
  27. return 0;
  28. }
  29.  
Success #stdin #stdout 0s 4356KB
stdin
Standard input is empty
stdout
50, 50, 67bd9684, 67bd9684, 67bd9684, 50