Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design a program using ordinary pipes in which one process sends a string message to a second process, and the second process reverses the case

image text in transcribed

Design a program using ordinary pipes in which one process sends a string message to a second process, and the second process reverses the case of each character in the message and sends it back to the first process. For example, if the first process sends the message Hi There, the second process will return hl tHERE. This will require using two pipes, one for sending the original message from the first process to the sccond process, and the other for sending the modified message from tho second process to the first process. Your program should take a file name name as input and use it as follows name-1.txt: the name of the file that contains the message to be transformed name-2. txt: the name of the file that contains the message received by the second process from the first process. name-3.txt: the name of the file that contains the transformed message sent by the sccond process to the first process. name-4.txt: the name of the file that contains the transformed message received by the first process from the second process. You should write your program in C/C++ and it should run on a UNIX/Linux system. You will need to use fork and pipe system calls in this program. You can learn more about these and other related system calls in the man pages. Design a program using ordinary pipes in which one process sends a string message to a second process, and the second process reverses the case of each character in the message and sends it back to the first process. For example, if the first process sends the message Hi There, the second process will return hl tHERE. This will require using two pipes, one for sending the original message from the first process to the sccond process, and the other for sending the modified message from tho second process to the first process. Your program should take a file name name as input and use it as follows name-1.txt: the name of the file that contains the message to be transformed name-2. txt: the name of the file that contains the message received by the second process from the first process. name-3.txt: the name of the file that contains the transformed message sent by the sccond process to the first process. name-4.txt: the name of the file that contains the transformed message received by the first process from the second process. You should write your program in C/C++ and it should run on a UNIX/Linux system. You will need to use fork and pipe system calls in this program. You can learn more about these and other related system calls in the man pages

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Master The Art Of Data Storytelling With Visualizations

Authors: Alexander N Donovan

1st Edition

B0CNMD9QRD, 979-8867864248

More Books

Students also viewed these Databases questions

Question

What activities do we reward?

Answered: 1 week ago

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago

Question

Explain the concept of shear force and bending moment in beams.

Answered: 1 week ago