Question
Raghu's boss Ananya gave him two files data1.txt and data2.txt which consists of the number of units sold per day (integer type values ONLY) for
Raghu's boss Ananya gave him two files "data1.txt" and "data2.txt" which consists of the number of units sold per day (integer type values ONLY) for item 1 and item 2 respectively for 1000 days. Ananya wants a new file "data3.txt" which will consist of data in following sequence
1. First 100 values from "data1.txt" 2. Skip first 100 values of "data2.txt" and add values from 100 to 200 from "data2.txt" to "data3.txt"
3. Add remaining values from "datai.txt" to "data3.txt" 4. Add remaining values from (from 200 onwards) "data2.txt" to "data3.txt"
Write a C program that solves Raghu's problem using file handling. (Hint: Make use of fseek())
Step 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