Challenge: Append One File's Contents to the End of Another

Write a program to append the contents of one file to the end of another.

Write a program to read the contents of one file and append these contents to the end of another file:

  • Input: Read the content from the file1.txt, then read the content from the file2.txt. Concatenate the file1.txt content with the file2.txt content.
  • Output: After the concatenation of the content, write the concatenated content in the file2.txt.

Get hands-on with 1200+ tech skills courses.