fork download
  1. #include<stdio.h>
  2.  
  3. int main(void){
  4. int a = 2, *p = &a, **q = &p;
  5.  
  6. printf("The value of a is 0x%-8x, It's address is %p\n", a, &a);
  7. printf("The value of p is 0x%-8x, It's address is %p\n", p, &p);
  8. printf("The value of q is 0x%-8x, It's address is %p\n", q, &q);
  9.  
  10. int **p1 = &a;
  11. int *p2 = &p;
  12.  
  13. printf("%d %d\n", *p1, **(int **)p2);
  14. return 0;
  15. }
  16.  
  17.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
The value of a is 0x2       , It's address is 0x7ffcdb2c86a4
The value of p is 0xdb2c86a4, It's address is 0x7ffcdb2c86a8
The value of q is 0xdb2c86a8, It's address is 0x7ffcdb2c86b0
2 2