fork download
  1. /* main program illustrating the UNIX fork() system call.
  2. Compile using cc -o main main.c
  3. */
  4. #include <stdio.h>
  5. int main(){
  6. fork();
  7. printf("Hello\n");
  8. fork();
  9. printf("World\n");
  10. }
Success #stdin #stdout 0s 5516KB
stdin
Standard input is empty
stdout
Hello
World
Hello
World
Hello
World
Hello
World