Question: This program is in C: I am currently struggling with this problem... Write a character I/O program that will read chars from the standard input
This program is in C:
I am currently struggling with this problem...
Write a character I/O program that will read chars from the standard input stream, and copy them to the standard output stream. However, before copying the input character to stdout, you will first convert it if it's an alphabetic character (non-alphabetic characters won't be modified). To do this you'll use the "rot13" algorithm, which is short for "rotate 13" places. In other words, if you read in the letter 'a', you'll write out the character 'n'. If you read in the letter 'b', you'll write out the letter 'o', the letter 'c' becomes the letter 'p', etc. This works in reverse as well: the letter 'n' becomes the letter 'a', the letter 'o' becomes the letter 'b', and so on, so that the alphabet is used as a circular list. (To see this more easily, write the alphabet and number each letter from 1 to 26, see what happens when a letter is moved forward or backward 13 positions.)
Run the program using redirection operators on the command line so that an input file is copied to an output file. Then to see it work in reverse, feed the generated file as input to the program and you should get the original file back. Notice that the program only operates on alphabetic letters; any digits, whitespace or punctuation characters are left unchanged.
Here is the sample run:

[hello there! uryyb gurer! [How are you doing today? Ubj ner lbh qbvat gbqnl
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
