Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C programing Write a program that does the following: Opens two text files (dat1.txt and dat2.txt) o Each file contains only integers, one per line,
C programing
Write a program that does the following: Opens two text files (dat1.txt and dat2.txt) o Each file contains only integers, one per line, in sorted order Opens one output file (out.txt) Let the user select whether to merge the files or calculate the average of each file o If the user chooses to merge the files, then all the integer values should be written to the output file in sorted order. There should be 5 integers per line, with a tab between each integer value. IMPORTANT UPDATE*There should be no duplicates in the output file! o If the user chooses to calculate the average of each file then you should write the following for each file to the output file: "File fileName had XX values read with a calculated average of Y.YY" Submit your source file (.c) for the assignmentStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started