Question: Write a complete program that copies each character that is input from the keyboard and prints it to the screen, with the following three exceptions.

Write a complete program that copies each character that is input from the keyboard and prints it to the screen,
with the following three exceptions.
(1) when the user hits the "Enter" key of the keyboard (newline) the two characters '\' and 'n' are printed to the screen with no
space between them. The newline is not printed to the screen. What char does scanf(%c,c1) store in c1 the when the user
hits the Enter key?
(2) when the user enters cntrl-Z the program terminates.

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!