0% found this document useful (0 votes)
28 views2 pages

Programming Quiz

The document describes creating a linked list management system in C to store and manage student data. It involves: 1. Defining a Student structure with ID, name, grade, and next pointer fields. 2. Implementing functions to add, remove, display, search, and count students in the linked list. 3. Creating a menu-driven program to allow adding, removing, displaying, searching, counting, sorting, and updating students, and exiting the program. 4. Testing the system by adding sample students, and ensuring correct behavior of operations.

Uploaded by

niveshsharma8800
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views2 pages

Programming Quiz

The document describes creating a linked list management system in C to store and manage student data. It involves: 1. Defining a Student structure with ID, name, grade, and next pointer fields. 2. Implementing functions to add, remove, display, search, and count students in the linked list. 3. Creating a menu-driven program to allow adding, removing, displaying, searching, counting, sorting, and updating students, and exiting the program. 4. Testing the system by adding sample students, and ensuring correct behavior of operations.

Uploaded by

niveshsharma8800
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Prepare a word/pdf file with code and snapshots. Timing: 45 mins.

Q1. Title: Linked List Management System in C Full Marks: 20 Marks

Scenario:

You have been assigned the task of creating a Linked List Management System for a student database.
The system will be used to store and manage information about students, such as their names, IDs, and
grades. As part of your assignment, you need to implement various operations on a singly linked list data
structure using C programming.

Instructions:

Define the Linked List Structure:

Define a structure named Student with the following members:

 int student_id: A unique identifier for each student.


 char name[50]: The name of the student.
 float grade: The grade of the student.
 struct Student* next: A pointer to the next student in the linked list.

Implement Linked List Operations:

 Create a function named addStudent that adds a student to the linked list. This function should
prompt the user to enter the student's details and insert the student at the end of the list.
 Create a function named removeStudent that removes a student from the linked list based on
their student_id.
 Create a function named displayStudents that displays the details of all students in the linked
list.
 Create a function named searchStudent that searches for a student in the linked list based on
their student_id.
 Create a function named countStudents that counts the number of students in the linked list.

Implement the Linked List Management System:

Create a menu-driven program that allows the user to perform the following actions:

 Add a student.
 Remove a student.
 Display all students.
 Search for a student.
 Count the number of students.
 Sort the students based on their names or grades.
 Update the details of a student.
 Exit the program.
Test the Linked List Management System:

 Create a few sample students and add them to the linked list.
 Test each operation by selecting the respective option from the menu.
 Ensure that the system behaves correctly by adding, removing, displaying, searching, and
counting students as expected.

Note: While implementing the linked list, ensure that you handle edge cases appropriately. For example,
what should happen if a student is not found in the list? Also, consider how the program should handle
duplicate student IDs.

You might also like