Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1) Write a program in C that stores a list of employee records in an array of structs. Each employee record should contain the following
1) Write a program in C that stores a list of employee records in an array of structs. Each employee record should contain the following fields: Name (string), Age (int), Salary (float),Department (string). The program should prompt the user to enter the name of an employee, and then search the array of employee records for an employee with a matching name. If a matching employee is found, the program should print out the employee's age, salary, and department. If no matching employee is found, the program should print an error message. The program should use a linear search algorithm to find a matching employee in the array. If the employee's age is greater than 50 , their salary should be multiplied by 1.1. If the employee's age is less than or equal to 50 , their salary should be divided by 1.2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started