Question: c Language Write a C program with the following specifications: Write the definition of a structure named employee that contains character array members for an

c Language c Language Write a C program with the following specifications: Write the

Write a C program with the following specifications: Write the definition of a structure named employee that contains character array members for an employee's first and last names of size 20, an int member for the employee's age, a char member that contains 'M' or 'F' for the employee's gender, and a doublemember for the employee's hourly salary. Using the above-mentioneddefinition, write a C program that asks a user to enter the values of 20 employees and save them in an array of employees. Hint: To define an array that contains 20 elements of type 'struct employee', you just need to Write : struct employee employees[20]; Modify your program to include a function, whichcalculates the average salary of all employees. The function takes as input the array of all employees and returns the average salary as float value. Modify you program to include a function that take the array of all employees as input and return the employee record with the youngest age. If there is more than one employee with the same youngest age, the program should return one of them Modify your program to include a function that take the array of all employees as input and sort it in an ascending way according to the employee age. There is no need for a return value to the function, but somehow the result must be assigned to thecaller. Modify your program to include a function, whichprints all the content of the employees array. The array of all employees acts as input and there is no return type of this function

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!