fork download
  1. #include <stdio.h>
  2.  
  3. int main(void);
  4. void print1()
  5. {
  6. /*JOKE1!*/
  7. printf("Go1!\n");
  8. }
  9. //This macro wrappes real main(){/*JOKE2!*/} function
  10. #define pain main
  11. void print2()
  12. {
  13. /*JOKE3!*/
  14. printf("Go2!\n");
  15. }
  16. #define main_decl int pain(void){ \
  17.   /*REAL1?*/ \
  18. printf("Starting main(){/*JOKE4!*/}\n"); \
  19. __main(); \
  20. printf("Out of main\n"); \
  21. }
  22.  
  23. main_decl
  24.  
  25. #define main __main
  26.  
  27. int main()
  28. {
  29. /*REAL2?*/
  30. print1();
  31. print2();
  32. return 0;
  33. }
  34.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
Starting main(){/*JOKE4!*/}
Go1!
Go2!
Out of main