Question: C++ ONLY Write a program that reads each line in a file, reverses its lines, and writes them to another file. Suppose the user specifies
C++ ONLY
Write a program that reads each line in a file, reverses its lines, and writes them to another file. Suppose the user specifies input.txt and output.txt when prompted for the file names, and input.txt contains the lines
Mary had a little lamb
Its fleece was white as snow
And everywhere that Mary went
The lamb was sure to go.
After the program is finished, output.txt should contain
The lamb was sure to go.
And everywhere that Mary went
Its fleece was white as snow
Mary had a little lamb
C++ ONLY
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
