Question 16
What could be the possible output of the following program?
#include <stdio.h>#include <stdlib.h>#include <unistd.h>
int main() { int x = 5, pid; pid = fork(); if (pid == 0) { x += 3; printf("Child 1: %d\n", x); } else { x += 7; printf("Parent 1: %d\n", x); pid = fork(); if (pid == 0) { x += 10; printf("Child 2: %d\n", x); } else { x += 15; printf("Parent 2: %d\n", x); } } return 0;}