Write a program that reads each line in a file, reverses its lines, and writes them to

Question:

Write a program that reads each line in a file, reverses its lines, and writes them to another file. For example, if the file 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. and you run reverse input.txt output.txt then output.txt contains The lamb was sure to go. And everywhere that Mary went Its fleece was white as snow Mary had a little lamb

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: