Devops-exercises/topics/os/fork_102.md
2025-08-07 20:25:17 +03:00

291 B

Fork 102

Answer the questions given the following program (without running it):

#include<stdio.h>
#include <unistd.h> 

int main()
{
  fork();
  fork();
  printf("\nyay\n");
  return 0;
}
  1. How many times the word "yay" will be printed?
  2. How many processes will be created?