Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in C that uses a pointer-based linked list. You should use the following struct (declared as a global): struct node { char

Write a program in C that uses a pointer-based linked list. You should use the following struct (declared as a global): struct node { char name[10]; struct node *next; }; Note that no other variables can be global. To populate your linked list open the hw11.data file and read in the contents. The file format is as follows: name op_code For example: Vlad a Cullen a Morticia a Ophelia a Smurf a Morticia d The name will be a string. The op_code will be a character ('a' or 'd'), where 'a' indicates that you should add this person to the linked-list, 'd' indicates that you should delete this person from the linked-list. Note that when you add a person you must add them in increasing order. I.e. we are adding them as an insertion sort (no, you cannot presort the list). This MUST be seperate functions (adding and deleting). You also need to provide output that proves your program works. After the last data item has been processed, your program must display the contents of the linked-list. This MUST be a seperate function. if someone could explain how the insertion sort works, that would be helpful. Your program must also correctly free all links of the list on termination. This MUST be a seperate function.

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_2

Step: 3

blur-text-image_3

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

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions

Question

Define the terms operations management and supply chain. LO.1

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago