Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

Discuss the various types of policies ?

Answered: 1 week ago

Question

Briefly explain the various types of leadership ?

Answered: 1 week ago

Question

Explain the need for and importance of co-ordination?

Answered: 1 week ago

Question

Explain the contribution of Peter F. Drucker to Management .

Answered: 1 week ago