Assuming that the system call $\text{fork}()$ never fails, consider the following C program $P1$ and $P2$ executed on a UNIX/Linux system:
$\begin{array}{|ll|ll|} \hline & /*P1*/ & &/*P2*/ \\ \text{int} & \text{main}() \{ & \text{int} & \text{main} () \{ \\ & \text{fork} (); & & \text{fork();} \\ & \text{fork}(); && \text{printf(“Happy \n”)}; \\ & \text{fork}(); & & \text{fork()}; \\ & \text{printf(“Happy \n”);} & &\text{printf(“Happy \n”);} \\ \} & & & \text{fork()};\\ && & \text{printf(“Happy \n”);} \\ && \} \\ \hline \end{array}$
Statement $I$: $P1$ displays “Happy” $8$ times
Statement $II$: $P2$ displays “Happy” $12$ times
In the light of the above statements, choose the correct answer from the options given below
- Both Statement $I$ and Statement $II$ are true
- Both Statement $I$ and Statement $II$ are false
- Statement $I$ is correct but Statement $II$ is false
- Statement $I$ is incorrect but Statement $II$ is true