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
Get step-by-step solutions from verified subject matter experts
