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
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
Step by Step Solution
3.37 Rating (166 Votes )
There are 3 Steps involved in it
imrt jviBufferedReder imrt jviBufferedWriter imrt jviFile imrt jviFileReder imrt jviFileWriter imrt ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
2106_61d6ac3464642_872636.pdf
180 KBs PDF File
2106_61d6ac3464642_872636.docx
120 KBs Word File
