fork(2) download
  1. #include <stdio.h>
  2.  
  3. void Test(int *depth)
  4. {
  5. printf("%d\n", *depth);
  6.  
  7. (*depth)++;
  8.  
  9. if(*depth < 5)
  10. {
  11. Test((depth)++);
  12. }
  13. }
  14.  
  15. int main(void) {
  16. int depth = 0;
  17.  
  18. Test(&depth);
  19.  
  20. printf("%d\n", depth);
  21. // your code goes here
  22. return 0;
  23. }
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
0
1
2
3
4
5