Write a program that reads a file named input.txt and writes a file that contains the same contents, but is named output.txt. The input file will contain more than one line when I test this and so should your output file. Do not use a path name when opening these files. This means the files should be located in the top level folder of the project. This would be the folder that contains the src folder. Do not use a copy method that is supplied by Java. Your program must read the file line by line and write the file itself.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question

Write a program that reads a file named input.txt and writes a file that contains the same contents, but is named output.txt. The input file will contain more than one line when I test this and so should your output file. Do not use a path name when opening these files. This means the files should be located in the top level folder of the project. This would be the folder that contains the src folder. Do not use a copy method that is supplied by Java. Your program must read the file line by line and write the file itself.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning