fork download
  1. #include <stdio.h>
  2. void f1(); void f2(); void f3();
  3.  
  4. int main() { f1(); printf("\n"); return 0; }
  5.  
  6. void f1() { f2(); printf(" there "); }
  7.  
  8. void f2() { f3(); printf(" hello "); }
  9.  
  10. void f3(){
  11. int x;
  12. //Can add whatever under here
  13. static count = 0;
  14. static char buf[256];
  15. if(count==0) {
  16. setvbuf(stdout, buf, _IOFBF, sizeof(buf));
  17. int atexit (void (*func)(void));
  18. atexit(f3);
  19. count = 1;
  20. } else {
  21. const char *src = " there hello \n";
  22. char *dest = buf;
  23. for(; *src;) *dest++ = *src++;
  24. }
  25. }
Success #stdin #stdout 0s 9296KB
stdin
Standard input is empty
stdout
 there  hello