Consider the following program.
#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
int main(void)
{
pid_t pid;
int varl = 100;
pid = fork();
if(pid == 0) /* Child process */
varl = 200;
fork();
printf(“%d”, varl);
return 0;
}
Assuming all invocations of fork are successful, which of the following is a correct output when the program is executed on the $\text{UNIX OS}?$
- $100 \; 100 \; 200 \; 200$
- $200 \; 200 \; 200 \; 200$
- $100 \; 100 \; 100 \; 100$
- $100 \; 200 \; 200 \; 200$