#include&lt;stdio.h&gt;   #include&lt;stdlib.h&gt;   #include&lt;unistd.h&gt;&nbsp;   int main&#40;&#41;   &#123;       pid_t child;       child = fork&#40;&#41;;       switch&#40;child&#41;&#123;           case -1 :               perror&#40;&quot;fork&quot;&#41;;               exit&#40;1&#41;;           case 0 :               sleep&#40;10&#41;;               printf&#40;&quot;%d\n&quot;,getppid&#40;&#41;&#41;;               break;           default :               break;       &#125;       return 0;   &#125;
A. 0
B. 1
C. an integer value except 0 and 1 i.e. PID of a process
D. none of the mentioned
Answer:A
#include&lt;stdio.h&gt;   #include&lt;stdlib.h&gt;   #include&lt;unistd.h&gt;&nbsp;   int main&#40;&#41;   &#123;       pid_t child;       child = fork&#40;&#41;;       switch&#40;child&#41;&#123;           case -1 :               perror&#40;&quot;fork&quot;&#41;;               exit&#40;1&#41;;           case 0 :               sleep&#40;10&#41;;               printf&#40;&quot;%d\n&quot;,getppid&#40;&#41;&#41;;               break;           default :               break;       &#125;       return 0;   &#125;
A. 0 B. 1 C. an integer value except 0 and 1 i.e. PID of a process D. none of the mentioned
Explanation:In this program the parent process terminates before the child process. Hence the child process prints 1 as its parent process ID. The output of this program will appear after 10 seconds.