fork(3) download
  1. #include <stdio.h>
  2. void main()
  3. {
  4. printf("\n i am in main");
  5. italy();
  6. printf("\n i am finally back in main");
  7. }
  8. italy()
  9. {
  10. printf("\n i am in italy");
  11. brazil();
  12. printf("\n i am back in italy");
  13. }
  14. brazil()
  15. {
  16. printf("\n i am in brazil");
  17. argentina();
  18. }
  19. argentina()
  20. {
  21. printf("\n i am in argentina");
  22. }
  23. return 0;
  24. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:2:6: warning: return type of 'main' is not 'int' [-Wmain]
 void main()
      ^
prog.c: In function 'main':
prog.c:5:1: warning: implicit declaration of function 'italy' [-Wimplicit-function-declaration]
 italy();
 ^
prog.c: At top level:
prog.c:8:1: warning: return type defaults to 'int' [-Wimplicit-int]
 italy()
 ^
prog.c: In function 'italy':
prog.c:11:2: warning: implicit declaration of function 'brazil' [-Wimplicit-function-declaration]
  brazil();
  ^
prog.c: At top level:
prog.c:14:1: warning: return type defaults to 'int' [-Wimplicit-int]
 brazil()
 ^
prog.c: In function 'brazil':
prog.c:17:2: warning: implicit declaration of function 'argentina' [-Wimplicit-function-declaration]
  argentina();
  ^
prog.c: At top level:
prog.c:19:1: warning: return type defaults to 'int' [-Wimplicit-int]
 argentina()
 ^
prog.c:23:1: warning: data definition has no type or storage class
 getch();
 ^
prog.c:23:1: warning: type defaults to 'int' in declaration of 'getch' [-Wimplicit-int]
prog.c:24:1: error: expected identifier or '(' before 'return'
 return 0;
 ^
prog.c:25:1: error: expected identifier or '(' before '}' token
 }
 ^
prog.c: In function 'italy':
prog.c:13:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
prog.c: In function 'brazil':
prog.c:18:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
prog.c: In function 'argentina':
prog.c:22:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
stdout
Standard output is empty