fork(1) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void)
  5. {
  6. int x;
  7. x = 5;
  8. while (x == 5) {
  9. fprintf(stdout, "Inside the 1st loop.\n");
  10. x = 6;
  11. }
  12. fprintf(stdout, "Outside the 1st loop!\n");
  13.  
  14. while (x == 5) {
  15. fprintf(stdout, "Inside the 2nd loop.\n");
  16. }
  17. fprintf(stdout, "Outside the 2nd loop!\n");
  18.  
  19. return (EXIT_SUCCESS);
  20. }
  21.  
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
Inside the 1st loop.
Outside the 1st loop!
Outside the 2nd loop!