(10 points) Write a program that reads a text file in character-by-character
and performs the following normalization tasks:
- Replaces all tab characters with 4 spaces
- Replaces all lower case letters with upper case letters
- Double spaces the file by replacing each newline with two newlines
You will have two file streams: an input file stream for the file to be
normalized and an output file stream that contains the normalized file.
You should issue an error message and exit the program if either file cannot
be opened.
Your program should prompt the user for the filename for the file to be
normalized (the input file). The output filename should be the input filename
with ".norm" added to it. For example, if the input file is "data.txt", the
output file name will be "data.txt.norm".
Sample input file: hw4_input1
Hint: Do the above replacements by immediately sending the replacement string
out to the output file when the desired character is found in the input file.
If the input file character doesn't need to be replaced, just immediately send
it to the output file.
Your code must work correctly on the provided sample input file. You may also
generate additional files with which to test your code, but it will only be
graded against hw4_input1.