Question: C programming Structures. #define #define #define lab will focus on the use and manipulation of structures. Each se ould be designed within its own function,
C programming Structures. #define



lab will focus on the use and manipulation of structures. Each se ould be designed within its own function, passing parameters as essary. You are to construct a C pro manipulate a company's payroll database, payfile.txt ction of the lab sh gram, database.c, which will retrieve . The data for each employee should be read into a struct containing the following field identifiers: . first 7 characters maximum tial 1 character maximum 9 characters maximurm 16 characters maximum 11 characters maximum 2 characters maximum 5 characters maxi mum integer 1 character maximum (M/E) integer representing years of employment double representing weekly salary . last . city . state . 21p . age . sex . tenure . salary Your program should perform each of the operations indicated below. Be sure to clearly label your output for each section. Remember, each section of the lab should be designed within its own function, passing parameters as necessary a) Read data for employees into an array of structures. b) Output the contents of each structure into an easily read format, similar to the format of the input file. c) Output the first and last name of all men on the payroll. d) Output the first and last name of the highest paid woman on the payroll. e) Output the first and last name of the lowest paid man on the payroll. Output the average salary for all the employees. 9) Output the first and last name of all women earning less than the average salary ) Output to three decimal places the ratio of the number of men above the average salary to the number men below the average salary. Page 42
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
