A modular Mess Management System written in C, designed for university-level project submission.
The system uses a clean layered architecture with separate modules for students, meals, billing, file handling, and authentication.
All student data is stored in a binary file (students.bin).
MessSystem/
│
├── main.c
├── auth.c
├── student.c
├── meal.c
├── billing.c
├── file_handler.c
│
├── config.h
├── auth.h
├── student.h
├── meal.h
├── billing.h
├── file_handler.h
│
└── data/
└── students.bin
- Add new student
- View all students
- Update student room
- View individual student profile
- Add meals for each student
- Automatically updates meal count
- Calculates bill based on number of meals
- Uses fixed meal rate (modifiable in
config.h) - Stores updated bill inside student record
- Binary file based storage (
students.bin) - Safe read/write operations
- Auto-create data file if missing
- Search student by ID
- Admin panel
- Student login (ID-based access)
Defined in config.h:
typedef struct {
int id;
char name[50];
int room;
int mealCount;
float bill;
} Student;bill = mealCount × MEAL_RATE
You can change the meal rate from:
#define MEAL_RATE 50.0f
If you're using GCC:
gcc main.c auth.c student.c meal.c billing.c file_handler.c -o mess
Then run:
./mess
1. Add Student
2. View Students
3. Update Room
4. Add Meal
5. Calculate Bills
0. Exit
1. View Profile
2. View Bill
0. Exit
All data is stored in:
data/students.bin
This file is created automatically.
- No password required for login.
- Admin and Student menus are separated.
- System is fully modular for easy maintenance.
- Add password-based login
- Add monthly meal reset
- Export bill report to text file
- Search student by name
- Delete student
This Mess Management System demonstrates:
- Modular C programming
- File handling with binary data
- Menu-driven navigation
- Student and meal management
- Dynamic bill calculation
It is suitable for academic submission or extension as a real project.