This project is a simple C-based Student Record Management System that allows users to add and manage student data, such as ID, name, class, and mobile number. The data is stored in a file (record.txt) to retain the records across sessions.
- Add a new student record with details like ID, name, class, and mobile number.
- Store data in a text file (
record.txt) for persistence.
- Error Handling: Enhance error handling across functions, especially in fopen and fclose, to ensure robust file management.
- Memory Safety: Improve string handling in functions using fgets to prevent buffer overflow risks.
- Unimplemented Functionality: Implement the deleteByID function for removing student records by ID.
- Input Validation: Add validations to user inputs for menu options and other entries to prevent invalid data entry.
- File Structure Consistency: Adopt a standard format for storing records in record.txt (e.g., comma-separated or tab-separated values).
- Code Refactoring: Break down large functions, add comments, and document the purpose of each function.
To contribute to this project, please fork the repository and submit a pull request with clear descriptions of the changes made.
record.c: Contains the main code for managing student records.record.txt: The file where student records are stored.
To compile the program, use the following command:
gcc record.c -o recordAfter compiling, run the executable to start managing records:
./record- The program will prompt you to enter student details. Follow the instructions on the screen.
- The data will be stored in
record.txt.
The main components in the code include:
- Struct Definition: Defines a
Studentstruct with fields likeid,name,className, andmobileNumber. - File Handling: Records are written to
record.txt. - Functions:
addStudent: Adds a new student record.
- C compiler (e.g., GCC)
This project is for educational purposes and can be freely modified and distributed.