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. main() {
  6. printf("1");
  7. fork();
  8. printf("2");
  9. fork();
  10. printf("3");
  11. }
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
123