Write a program in 'C' for implementation of a single linked list of name and age of different persons and also do the following by using one function each for each task: (a) The linked list needs to be sorted always. (b) It should accept a person's name and age and insert the node at right position in the list so that it remains sorted after insertion. The list should be sorted on name and then on age.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter17: Linked Lists
Section: Chapter Questions
Problem 5SA
icon
Related questions
Question

Write a program in 'C' for implementation of a single linked list of name and age of different persons and also do the following by using one function each for each task:

(a) The linked list needs to be sorted always.

(b) It should accept a person's name and age and insert the node at right position in the list so that it remains sorted after insertion. The list should be sorted on name and then on age.

MakeMake necessary assumptions.

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Merge Sort
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning