fork download
  1. #include <stdio.h>
  2.  
  3. void up_and_down(int);
  4.  
  5. int main(void) {
  6. up_and_down(1);
  7. return 0;
  8. }
  9.  
  10. void up_and_down (int n)
  11. {
  12. printf("Level %d: n location %p\n", n, &n);
  13. if (n<4)
  14. up_and_down(n+1);
  15. printf("LEVEL %d: n location %p\n", n, &n);
  16. }
Success #stdin #stdout 0s 5304KB
stdin
Standard input is empty
stdout
Level 1: n location 0x7fffb959e6ac
Level 2: n location 0x7fffb959e68c
Level 3: n location 0x7fffb959e66c
Level 4: n location 0x7fffb959e64c
LEVEL 4: n location 0x7fffb959e64c
LEVEL 3: n location 0x7fffb959e66c
LEVEL 2: n location 0x7fffb959e68c
LEVEL 1: n location 0x7fffb959e6ac