Using the program shown below, explain what the output will be at lines X and Y. 0) ( wait (NULL): for (i = 0: i tinclude #include tinclude #define SIZE 4 int nums [SIZE] - (8,9,1,20): int main () int...


Using the program shown below, explain what the output will be at lines X and Y.


tinclude <stdio.h><br>#include <sys/types.h><br>tinclude <unistd.h><br>#define SIZE 4<br>int nums [SIZE] - (8,9,1,20):<br>int main ()<br>int i:<br>pid_t pid;<br>pid = fork ():<br>if (pid -- 0) {<br>for (i - 0: i < SIZE: i++) {<br>printf(
0) ( wait (NULL): for (i = 0: i < size:="" i++)="" nums="" [1]="" -="" 1="" +="" nums="" (1]:="" printf("parent:="" d\n",nums="" (1]):="" *="" line="" y="" */="" return="" 0;="" "/="">
Extracted text: tinclude #include tinclude #define SIZE 4 int nums [SIZE] - (8,9,1,20): int main () int i: pid_t pid; pid = fork (): if (pid -- 0) { for (i - 0: i < size:="" i++)="" {="" printf("child="" sd\n",nums="" [i]="" *2):="" *="" line="" x="" */="" else="" if="" (pid=""> 0) ( wait (NULL): for (i = 0: i < size:="" i++)="" nums="" [1]="" -="" 1="" +="" nums="" (1]:="" printf("parent:="" d\n",nums="" (1]):="" *="" line="" y="" */="" return="">

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here