Question: Write a program that does the following: Reads 4 characters from standard input (all on one line, no spaces). The code should read one character
Write a program that does the following:
- Reads 4 characters from standard input (all on one line, no spaces). The code should read one character at a time, using a separate variable for each character read.
- Outputs the characters in reverse order, one at a time, to standard output. For example, entering cake producesekac
Im struggling to make this as simple as possible without using scanf. I need to use getchar/putchar
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
