Question: Write a program that merges the numbers in two files and writes all the numbers into a third file. Each input file contains a list

 Write a program that merges the numbers in two files andwrites all the numbers into a third file. Each input file containsa list of numbers of type int in sorted order from the

Write a program that merges the numbers in two files and writes all the numbers into a third file. Each input file contains a list of numbers of type int in sorted order from the smallest to the largest. After the program is run, the output file will contain all the numbers in the two input files in one longer list in sorted order from smallest to largest. Your program should define a function that is called with the two input file streams and the output file stream as three arguments. Sample output (bolded text denote input from user) Filenames are restricted to 12 characters Enter the first of two input file names HW10F1.txt Now a second input file name HW10F2.txt Enter the output file name. WARNING: ANY EXISTING FILE WITH THIS NAME WILL BE ERASED. output.txt END OF PROGRAM Contents of file HW 10F1.bxt are: 357 10 Contents of file HW10F2.txt are: 1 2 4 68 Contents of merged file, output.txt are: 1 2 3 4 5 67 8 10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!