Question
Using the program fragment below, write a program that contains a linked list of students. The program should allow: 1. initialize list of students 2.
Using the program fragment below, write a program that contains a linked list of students. The program should allow:
1. initialize list of students
2. add additional student to front of list
3. add additional student to rear of list
4. delete student
5. sort students alphabetically
6. sort students by idNum
7. show number of students in list
8. print students
9. quit program
***************************************************************
// list.h //
#ifndef LIST_H #define LIST_H
typedef struct { char month[4]; int day, year; } dateOfBirth;
typedef struct student { int age; float gpa; int idNum; dateOfBirth dob; char lastName[20]; char firstName[15]; struct student *next; } student_t;
typedef struct list { student_t *head; student_t *tail; int size; } list_t;
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