#include&lt;stdio.h&gt;   #include&lt;stdlib.h&gt;   #include&lt;unistd.h&gt;&nbsp;   int main&#40;&#41;   &#123;       pid_t child;       int a, status;       a = 10;       child = fork&#40;&#41;;       switch&#40;child&#41;&#123;           case -1 :               perror&#40;&quot;fork&quot;&#41;;               exit&#40;1&#41;;           case 0 :               printf&#40;&quot;%d\n&quot;,a&#41;;               break;           default :               wait&#40;&amp;status&#41;;               break;       &#125;       return 0;   &#125;
A. 10
B. garbage value
C. segmentation fault
D. program will give an error because variable “a” is not defined in child process
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;       int a, status;       a = 10;       child = fork&#40;&#41;;       switch&#40;child&#41;&#123;           case -1 :               perror&#40;&quot;fork&quot;&#41;;               exit&#40;1&#41;;           case 0 :               printf&#40;&quot;%d\n&quot;,a&#41;;               break;           default :               wait&#40;&amp;status&#41;;               break;       &#125;       return 0;   &#125;
A. 10 B. garbage value C. segmentation fault D. program will give an error because variable “a” is not defined in child process
Explanation:The child’s stack, data and heap segments are exact duplicates of its parent process when the process is created by “fork” system call.