Question: Kindly solve this in C Programming Background: To process sequential text files in C we use the stdio.h. Functions include:fopen(filename, MODE), where MODE could be

Kindly solve this in C Programming

Background:

To process sequential text files in C we use the stdio.h. Functions include:fopen("filename", MODE), where MODE could be one of Read, Write (create new file/erase existing file), and Append (add to existing file). ('r', 'w' and 'a' respectively)fclose() to close a file and release its handle.fscanf() and fprintf() to read and write to a file.

PART I:

Overview of Sequential FilesIn this lab you will continue using this structure and implement an interactive program capable of prompting the user and storing 3 employee records into a file called "employee.dat".The format of the file would look like this sample:

ID FIRSTNAME LASTNAME
10 John Doe
20 Mary Jane
30 Jim Smith

The skeleton code developed from this lab is placed here for convenience, use the 3 functions specified in this program to perform the input and saving the records to the file.

Kindly solve this in C Programming Background: To process sequential text files

PART II:

Retrieve the File you createdWrite a different program called fixcap.c that reads the file "employee.dat" created in part I containing the 3 records created in part I into an array called EmployeeList (of type employee, size 3). Then, use the WordCap(char *) function to capitalize only the first letter of each of the first and last names of the 3 employee records. Then save the new records back to the "employee.dat" file, overwriting the old records. Note: after you run program "fixcap.c" you can use the command "cat employee.dat" to view the contents of the file and verify the results.The file now should look like this sample:

ID FIRSTNAME LASTNAME
10 John Doe
20 Mary Jane
30 Jim Smith 

Document EVERY function (purpose/input/output), and EVERY declaration (Variables and Arrays), and every structure definition as shown in the examples.

#include struct employee\ char firstname[40]; char lastname[40]; int id; j; typedef struct employee Employee; Inpu the employee data interactively from the keyboard void InputEmployeeRecord (Employee *ptrEmp); /Display the contents of a given Employee record/ void PrintEmployeeRecord (const Employee e) /* Save the contents of the employee record list to the newly created text file specified by FileName * void SaveEmployeeRecord (const Employee e], const char FileName); void main) { Employee el; // TODO: modify to input and save an array of 3 employee records InputEmployeeRecord (&e1); PrintEmployeeRecord(e1); SaveEmployeeRecord(e1, "employee.dat

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!