Question: Programming in C: Singly Linked List In this lab you design and implement one of the essential data structures of all operating systems. You are

Programming in C: Singly Linked List

In this lab you design and implement one of the essential data structures of all operating systems. You are going to develop a "linked list". As discussed in class, operating systems use linked list to store and keep various information including but not limited to process information, scheduling data, I/O devices, etc.

For this project, you are designing a singly linked list which is used in a "phone book". The "phone book" stores the contact information in three data fields:

char First_Name[20]; char Last_Name[50]; char Phone_Number[10];

Your data is stored in a singly linked list with root node of root. Your program should provide the following functions:

Add, Search, Remove, Print [or] List

These functions behave as the followings:

Add: this function adds a contact to the linked list. Your function should ask for first name, last name and phone number. Then it should add the node to either head or tail of the linked list.

Search: this function searches for first name and returns the contact information (i.e. first and last name and the phone number) if the name exists in the list and returns an appropriate message (for example: contact does not exist in the list).

Remove: this function searches the list for the first name and removes the contact is the contact exists in the list. Otherwise, an appropriate message is printed.

Print [or] List: this function prints all the contacts in an appropriate format to show all the names along with the contact information.

You should submit your source code along with all other header files or function definition files (if you have them in separate files). Make sure your code compiles and executes before submission.

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!