Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 assignment

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions