fork(2) download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int i = 10;
  6. int *p = &i;
  7. foo(&p);
  8. printf("%d ", *p);
  9. printf("%d ", *p);
  10. }
  11. void foo(int **const p)
  12. {
  13. int j = 11;
  14. *p = &j;
  15. printf("%d ", **p);
  16. }
  17.  
Success #stdin #stdout 0s 10320KB
stdin
Standard input is empty
stdout
11 0 0