Question: write in programming language C please 1. (5pt) Suppose we have an employee data file (say emp.txt) containing the followings in each line per employee:

 write in programming language C please 1. (5pt) Suppose we have

write in programming language C please

1. (5pt) Suppose we have an employee data file (say emp.txt) containing the followings in each line per employee: employee ID, how many days he/she worked, and how many hours he/she worked in each day. Complete the following program that can read emp.txt file and print out the employee ID and total number of hours for each employee into an output file (say out.txt). For example, here is a sample emp. txt file with two employees and the expected out.txt file (an actual file may have more lines or days, so your program should be general enough to work with other files containing different number of employees or days): 11 45 8 27 13 10 2 4 4354352 4 11 22 13 36 program #include int main (void) FILE *infp, outfp; int ID, NumD, hour; int i, total; /* if needed you can declare other variables here

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!