Question: Solve this for operation system course Write three C + + program ( server . cpp , client.cpp ) as described below: First program (
Solve this for operation system course
Write three C program servercpp client.cpp as described below:
First program servercpp:
Creates a shared memory segment for storing n
Prompt the user to enter a number integer and store it in the shared memory
Print a message in new line "Program server: The number is in the shared in memory".
Second program clientcpp:
Client will access the shared memory created by the server.
It will check the value of the number n and print the message as follow:
tableModification actionIf the number is even,tablePrint message "Program client: Thenumber is even"If the number is odd,tablePrint message "Program client: Thenumber is odd"
Sample Inputoutput:
Enter the number
Program server: The number is in the shared in memory
Program client: The number is odd
Sample Inputoutput:
Enter the number
Program server: The number is in the shared in memory
Program client: The number is even
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
