-
Add a Student
- Input student details: ID, name, age, and GPA. Prevents duplicate IDs to maintain unique records.
-
Display All Students
- Lists all students with their respective details (ID, name, age, GPA). Organizes records in the order they were added.
-
Search by ID
- Find and display the details of a specific student using their unique ID.
-
Update Student Information
- Modify the name, age, or GPA of an existing student by their ID.
-
Delete a Student
- Remove a student record from the system using their ID. Handles both head and non-head node deletion seamlessly.
-
Calculate Average GPA
- Computes and displays the average GPA of all students in the system.
-
Find the Student with the Highest GPA
- Identifies and displays the details of the student with the highest GPA.
-
Exit the Program
- Safely terminates the program.
- Each student is stored in a dynamically allocated node of a linked list. Ensures scalability for managing multiple student records.
- Functions are written for each feature (e.g.,
addStudent,updateStudent,deleteStudent), making the code reusable and easy to maintain.
- Prevents duplicate IDs during student addition.
- Handles edge cases like empty lists or invalid inputs gracefully.
- Compile the program using a C compiler, e.g.,
gcc student_management.c -o student_management. - Run the program:
./student_management. - Use the menu options to perform various operations:
- Enter
1to add a new student. - Enter
2to display all students, and so on.
- Enter
- Follow prompts to input student details or IDs as required.