Question: (20pt) This question uses almost the same file format as in Quiz 6 that we solved in class. But this time, instead of reading and


(20pt) This question uses almost the same file format as in Quiz 6 that we solved in class. But this time, instead of reading and summarizing the data from the input file, we would like to create a dynamic data structure to store all the information about the employees in the memory for further analysis. Suppose the employee data file (say emp.txt) is now starting with an integer showing the number of employees in the file. It then contains that many lines, which are formatted as in Quiz 6. So the file has the followings in each line per employee: helshe worked, and how many hours he/she worked in each day. All these values are integers employee ID, how many days Here is a sample file with 3 employees: 11 4 582 13 10 244 3543 524 15 2 67 Complete the following program that can read emp.txt file and create the dynamic structure as shown in the below figure. There is no output file. ID NumD hours EIU 13 10 2 4 4 3 5 4 3 5 2 4 E[2] 152 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
