Question: Write a C program that creates the necessary child ( ren ) process ( es ) as per the figure. Let the parent to read
Write a C program that creates the necessary children processes as per the figure. Let the parent to read
the major id from keyboard and send it via pipe.
The calculation on a child side will be based on the following table:
When receiving the calculation result from the child process, the parent should display the total
amount to be paid beside your name. If the major was not listed in the table, the parent should
display "Sorry, your major is not correct".
Note: Provide a screenshot of your output.
At the end of the code parent side display your LIU name and id
Sample Run:
Output
Enter a major id :
total to be paid: $
LIU Ahmad Masri
Sample run:
Output
Enter a major id :
total to be paid: $
LIU Ahmad Masri
Sample run:
Output
Enter a major id :
error, enter or
LIU Ahmad Masri
Note: Provide a screenshot of your output.
At the end of the code parent side display your LIU name and id
THIS IS FOR THE SOLUTION NAME AND ID:
MY NAME IS :ANHAL BADRAN
ID:
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
