Objective: Objective of this activity is to refresh you C/C++ knowledge and get familiar with pointers and dynamic memory allocation that will be used in data structures
———————————————————————————————————
- Linked List Implementation
Write a C or C++ program that creates a linked list of student records. Each entry in the list is to have a student name, final average, and a pointer to the next student record. Also, the head pointer points at the beginning of the list and the tail pointer is pointing at the last node of the list. Your program should have following options.
Add this stage option 2 should display the message John 5.0 and option 3 should display 1 |
- Add student record
- Display student records
- Count number of records
- Exit
When you run the program for the first time, students linked list is empty and the head and tail pointers are null as shown below.
Add this stage option 2 should display the message “No student records” and option 3 should display 0 |
Initial setup:
After adding the first record:
After adding the second record
Add this stage option 2 should displayJohn 5.0 Jerry 3.0and option 3 should display 2 |
Submission
Your C++ or C program that implements the linked list operations above
Reviews
There are no reviews yet.