A menu-driven C program to manage student records using structures and file handling. Built as part of the CodeAlpha C Programming Internship (Task 3).
- Add Record – Add a new student's roll number, name, branch, and marks
- Delete Record – Remove a student record by roll number
- Update Record – Modify an existing student's details
- Search Record – Find a student record by roll number
- Display All Records – View all stored student records in a table format
- Structures (
struct) - File Handling (
fopen,fread,fwrite,fseek,fclose) - Binary file storage for permanent data persistence
- Modular programming (separate functions for each operation)
All student records are stored in a binary file (students.dat), so data remains saved even after the program closes. Each operation (add/update/delete/search) reads or modifies this file directly:
- Add – appends a new record to the file
- Search – scans the file for a matching roll number
- Update – locates the record and overwrites it in place using
fseek - Delete – copies all records except the target into a temporary file, then replaces the original
- Display – reads and prints every record in the file
gcc main.c -o student_system
./student_system===== STUDENT MANAGEMENT SYSTEM =====
1. Add Record
2. Delete Record
3. Update Record
4. Search Record
5. Display All Records
6. Exit
- Language: C
- Storage: Binary file (students.dat)
Lokeshwari — CodeAlpha C Programming Internship