Question
Write down a Linked list based C program for generating and manipulating students record. The program should do the following: a) Create initial linked list
Write down a Linked list based C program for generating and manipulating students record. The program should do the following:
a) Create initial linked list
i) Ask the user for the number of desired records as an input, e.g., n = 10.
ii) Create a Linked list with n nodes to representation of the students record.
iii) Each node of the linked list should be a structure with three members. The information part of the node should consist of the student_id which should be an integer value and students grade point average (GPA) which should be double or float variable. The maximum GPA should be 4.00. You will need another member in the linked list node which will be link part (pointer to student structure). The link part will help in linking the individual student nodes together in forming the linked list.
b) Traverse the linked list representing students record to print the students id and grade (GPA).
c) Do following insertions in the created linked list 1. Insert at the beginning of the linked list a student with student_id as 1001, and GPA as 3.5
2. Insert at the end of the linked list a student with student_id as 1020 and GPA as 3.75
d) Print the updated linked list representing students record.
e) Delete the second record in your updated linked list. Please print the updated linked list representing the students record.
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