Question: write the code in cpp and dont chatgpt, Write a program where the parent process has 7 children. Each child generates 4 random numbers from
write the code in cpp and dont chatgpt, Write a program where the parent process has children. Each child generates
random numbers from to calculates their mean, prints it in a new line and
returns. The parent should wait for the children to finish and then return. pts
Output: random number means calculated by each child.
Rubrics:
The student should have implemented the following things:
File qc containing the main function.
The parent process should fork times, possibly in a for loop.
Each child should pick random numbers, average them, print the average.
The parent should call wait times to wait for each of the children.
The printed output should have random means printed one after the other.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
