Select Page

DYNAMIC LINKED LISTS WITH POINTERSWrite a C program that will calculate
the gross pay of a set of employees. WHAT YOU NEED TO DO:
The program should prompt the user
to enter the number of hours each employee worked.
The program determines the overtime
hours (anything over 40 hours), the gross pay and then outputs a table
in the following format. Column alignment, leading zeros in Clock#, and
zero suppression in float fields is important. Use 1.5 as the overtime
pay factor.
You should implement this program using the following structure to store the information for each employee.
struct employee{Â  Â  char first_name [10];Â  Â  char last_name [10];Â  Â  int id_number; Â  Â  Â  Â  Â  Â Â /* use can use long int if you wish */Â  Â  float wage;Â  Â  float hours;Â  Â  float overtime;Â  Â  float gross;Â  Â Â struct employee *next;};
Create a linked list of structures using the following data:Connie Cobol 98401 10.60Mary Apl 526488 9.75Frank Fortran 765349 10.50Jeff Ada 34645 12.25Anton Pascal 127615 8.35Unlike
previous assignment, you need to prompt the user for all of the above
information, … and you still need to prompt for the hours worked for
each employee.
Hint: Use one or two scanf statements to read in the first and last names with the %s format.
Get the data above from the terminal, and for each one:
get dynamic memory, using malloc, for an employee nodeput the employee data in the dynamic memory nodelink the nodes with pointers in the above order
After the list pointers are in
place you must get at the second and later instances of the structure by
going from the first structure down the chain of list pointers.
Then, for each employee, read in the hours worked from the terminal. Do all appropriate computations, and write out the table.Use the template and dynamically allocate linked list nodes as needed.Â
Similar to the previous assignment:a) Add a Total row at the end to sum up the hours, overtime, and gross columnsb) Add an Average row to print out the average of the hours, overtime, and gross columns.
Your code should work for any number of employees, and that is how the template is designed.Tip: Use left justification to line up character array name values … for example: %-10.10s or %-10s
Remember: Please use the template below!http://ideone.com/8p8Af7

#### Why Choose Us

• 100% non-plagiarized Papers
• Affordable Prices
• Any Paper, Urgency, and Subject
• Will complete your papers in 6 hours
• On-time Delivery
• Money-back and Privacy guarantees
• Unlimited Amendments upon request
• Satisfaction guarantee

#### How it Works

• Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
• Fill in your paper’s requirements in the "PAPER DETAILS" section.