Question: Instruction: Please read the instructions carefully and follow them sequentially. The lab activity will be explained thoroughly in the lab. Make sure you run the
Instruction: Please read the instructions carefully and follow them sequentially. The lab activity will be explained thoroughly in the lab. Make sure you run the program once you are done and test to see if it gives the correct/desired output. You should always check the rubric given right at the end to ensure you do not miss out on any points. Write a C program as follows:
Define an enum called department with values: Finance, Marketing and HR. Use typedef and rename the enum department as Dept
Define a struct called emp with 3 fields: employee_name of type char with max size of 30, salary of type float and department of type Dept (enum). Use typedef and call the Employee.
In the main(), do the following sequentially:
Declare a struct array called emp_array of size 3.
Assign values of your choosing for all the members of the struct
Check for the department values for all employees and raise the salary of employees for Finance department by 5%.
Finally print all the values.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
