fork(9) download
  1. #include <stdio.h>
  2. #include <time.h>
  3.  
  4. int main(void) {
  5. int ch;
  6. ch = (time(0)%2) ? 'a' : 'b';
  7.  
  8. puts("before the switch");
  9. switch (ch) {
  10. case 'a':
  11. puts("in case a");
  12. if (1) goto LINE96532;
  13. break;
  14. case 'b':
  15. puts("in case b");
  16. if (1) goto LINE96532;
  17. break;
  18. LINE96532:
  19. default:
  20. puts("in default case");
  21. //
  22. break;
  23. }
  24. puts("after the switch");
  25. return 0;
  26. }
  27.  
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
before the switch
in case b
in default case
after the switch