Question: Problem 2: Write a C program that will display text on any terminal. The program should first prompt the user for the name of the
Problem 2: Write a C program that will display text on any terminal. The program should first prompt the user for the name of the device ?le for the terminal on which to display output, as well as the output to display. It should then perform the necessary I/O operations. This process should repeat until the user decides to exit the program.

Enter the terminal to display in: /dev/pts/1 Enter the text to display: Testi Test1 Enter the terminal to display in: /dev/pts/2 Enter the text to display: Test2 Unable to open /dev/pts/2 for writing Enter the terminal to display in: /dev/pts/1 Enter the text to display: Test3 Test3 Enter the terminal to display in: exit Enter the terminal to display in: /dev/pts/1 Enter the text to display: Testi Test1 Enter the terminal to display in: /dev/pts/2 Enter the text to display: Test2 Unable to open /dev/pts/2 for writing Enter the terminal to display in: /dev/pts/1 Enter the text to display: Test3 Test3 Enter the terminal to display in: exit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
