Question: Using file I / O , arrays and functions Program Description: In this program you will need to read from a file employee data for

Usingfile I/O, arrays and functions
Program Description:In this program you will need to read from a file employee data for how many hours each employee worked for a week. Then for each of the employees, calculate the total of the hours worked and then sort the employees (and their data) into descending order based on their total hours.
Task Details:
Create a 50x8 int array to hold the employees data, and a size 50 string array to hold the employee names.
Read all the employee data into the arrays
Total number of hours worked in the week and store it in the int array at location 7. Create a const variable to make it obvious that your 7th position is being used to hold the total hours worked. Example: hour[ i ][ TTL_HRS ]= total;
Sort theemployees by the total number of hours they worked for the week. The sort should be in descending order (most hours to least)
Write out the information to the console

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 Programming Questions!