fork download
  1. #include <stdio.h>
  2.  
  3. //int *gp;
  4.  
  5. void func(int **p)
  6. {
  7. int i = 5;
  8. *p = &i;
  9. }
  10.  
  11. int main(void)
  12. {
  13. int *p;
  14. //p = gp;
  15. func(&p);
  16.  
  17. //printf("gp:%d\n", *gp);
  18. printf("p: %d\n", *p);
  19.  
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 4404KB
stdin
Standard input is empty
stdout
p: 0