Question: 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
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 an int member for the employee's age, a char member that contains or for the employee's gender, and a double member for the employee's hourly salary.
Using the abovementioned definition, write a C program that asks a user to enter the values of employees and save them in an array of employees.
Hint: To define an array that contains elements of type 'struct employee', you just need to write: struct employee employees ;
Modify your program to include a function, which calculates 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, which prints all the content of the employee's 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
