A console-based Library Management System written in C, supporting Admin and Student users with role-based functionality, user authentication, book borrowing/returning, and CSV-based storage.
- Full access to book and user records.
- Can borrow and return books on behalf of any user.
- Can change their own password.
- Can only borrow and return books for themselves.
- Can view users and available books.
- Can change only their own password.
- Login with
usernameandpassword. - Create a new user account.
- Role-based menus based on login credentials.
- ➕ Add Book
- 📚 List Books
- ✏️ Modify Book
- ❌ Delete Book
- 👥 List Users
- 🧑💼 Modify User
- 🗑️ Delete User
- 📖 Borrow Book (for any user)
- 📤 Return Book (for any user)
- 🔒 Change Own Password
- 🚪 Logout
- 📚 List Books
- 👥 List Users
- 🔒 Change Own Password
- 📖 Borrow Book (for self only)
- 📤 Return Book (for self only)
- 🚪 Logout
https://raw.githubusercontent.com/Chris-tech15/Library-Management-system/main/bottomed/Library-Management-system-v1.8.zip— Book records (ID, Title, Author, Quantity, etc.)https://raw.githubusercontent.com/Chris-tech15/Library-Management-system/main/bottomed/Library-Management-system-v1.8.zip— User information (ID, Name, Age, Role, Faculty, Username, Password)https://raw.githubusercontent.com/Chris-tech15/Library-Management-system/main/bottomed/Library-Management-system-v1.8.zip— Borrow/Return logs (User ID, Book ID, Dates)
- Input handled safely using
fgets()to avoid buffer overflows. - All user inputs trimmed for spaces and newline characters.
- Modular code using header file
library.h. - Uses enums to manage menu options clearly.
- Allows Admin to perform tasks for other users, enforcing role boundaries.
Compile using gcc:
gcc main.c books.c users.c borrow.c -o library