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 (server.cpp, client.cpp) as described below:
First program (server.cpp):
Creates a shared memory segment for storing n .
Prompt the user to enter a number integer and store it in the shared memory (n).
Print a message in new line "Program server: The number is in the shared in memory".
Second program (client.cpp):
1- Client will access the shared memory created by the server.
2- It will check the value of the number ( n ) and print the message as follow:
\table[[n,Modification action],[If the number is even,\table[[Print message "Program client: The],[number is even"]]],[If the number is odd,\table[[Print message "Program client: The],[number is odd"]]]]
Sample Input/output:
Enter the number =5
Program server: The number is in the shared in memory
Program client: The number is odd
Sample Input/output:
Enter the number =8
Program server: The number is in the shared in memory
Program client: The number is even
Solve this for operation system course Write

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!