Question
Write a program using C called FRIENDS.c. The program reads a list of your friend names which ends by the word end. The program builds
Write a program using C called FRIENDS.c. The program reads a list of your friend names which ends by the word end. The program builds a linked list using these names and prints the names in the order stored into the linked list. The list can be created using insertion at the beginning or insertion at the end; Use switch case to select the type of insertion; Case 1: insertion in the beginning; Case2: insertion in the end. Once the list is printed after insertion; count the total number of names(nodes) in the link list and then, remove the first name of the list and print the list. Sample Output: Select From the following options; type end to stop: 1. Insertion in the beginning of the list 2. Insertion at the end of the list //suppose user selects option 2 Enter the name of your friend: Mark Name Inserted!! Enter the name of your friend: John Name Inserted!! Enter the name of your friend: Paul Name Inserted!! Enter the name of your friend: end The List is: Mark- John Paul Total number of friends are: 3 The list is (after removing the first element): John Paul
Submission: Submit the C file with the name Student_name_Linked_List.c
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