The Bank Management System is a console-based application developed in the C programming language. This system is designed to simulate basic banking operations such as account creation, deposit, withdrawal, balance inquiry, and transaction tracking.
The application uses file handling to store and manage user data persistently. It ensures that account details are maintained even after the program is closed. The system also includes basic security mechanisms such as password protection and PIN verification to control access and protect user data.
This project is developed as a simple and efficient solution to understand core programming concepts like structures, file handling, functions, and modular programming in C. It provides a practical implementation of how real-world banking systems manage data and operations at a fundamental level.
The primary objective of this project is to develop a simple and efficient Bank Management System using the C programming language that can perform essential banking operations through a command-line interface.
The system aims to provide functionalities such as creating new accounts, depositing and withdrawing money, viewing account details, and maintaining transaction records. It is designed to demonstrate the practical use of file handling for data storage and retrieval, ensuring data persistence.
Another key objective is to implement basic security features such as system-level password protection and PIN-based account verification to restrict unauthorized access.
Additionally, this project helps in enhancing programming skills by applying concepts like structures, modular functions, data management, and user interaction in a real-world scenario.
The Bank Management System is a console-based application that allows users and administrators to perform various banking operations efficiently. The system is built using the C programming language and operates through a menu-driven interface.
The application supports two types of users: Admin and Normal User. The Admin has full access to all functionalities, including account creation, viewing all accounts, deleting accounts, and managing system data. The Normal User can perform limited operations such as deposit, withdrawal, checking transaction history, and searching account details.
All account information is stored in binary files, ensuring data persistence. The system uses file handling techniques to read, write, update, and manage records. Additionally, transaction activities are logged separately to maintain a history of operations.
Basic security measures such as system password authentication and PIN verification are implemented to ensure controlled access. The system also includes features like account locking after multiple failed attempts, data backup, and interest calculation.
Overall, the system provides a simplified model of banking operations and demonstrates how data and user interactions are managed in a structured program.
The Bank Management System provides a variety of features to perform essential banking operations efficiently. The key features of the system are as follows:
-
Account Creation: Allows the admin to create new bank accounts with a unique account number, user name, initial balance, and PIN.
-
Secure Login System: Includes system-level password protection and role-based login (Admin and User).
-
Deposit Functionality: Enables users to deposit money into their accounts after successful PIN verification.
-
Withdrawal Functionality: Allows users to withdraw money with proper balance validation and PIN authentication.
-
Account Display: Admin can view all account details stored in the system.
-
Account Deletion: Admin has the authority to delete existing accounts from the system.
-
Interest Calculation: Automatically adds interest to all accounts.
-
Transaction Logging: Records all deposit and withdrawal activities with date and time.
-
Mini Statement: Allows users to view their transaction history.
-
Search Functionality: Supports searching accounts by account number or account holder name.
-
Data Backup: Provides a feature to create a backup of account data.
-
Security Mechanisms: Includes PIN verification, limited login attempts, and simple data encryption for account holder names.
The Bank Management System must fulfill the following functional requirements to ensure proper operation of all banking features:
-
The system must allow the administrator to create new bank accounts with unique account numbers.
-
The system must provide a login mechanism for both Admin and User roles with proper authentication.
-
The system must allow users to deposit money into their accounts after successful PIN verification.
-
The system must allow users to withdraw money, ensuring that sufficient balance is available.
-
The system must display account details to the administrator.
-
The system must allow the administrator to delete an existing account.
-
The system must record all transactions including deposits and withdrawals with date and time.
-
The system must provide a mini statement feature to view transaction history for a specific account.
-
The system must support searching accounts by account number.
-
The system must support searching accounts by account holder name.
-
The system must calculate and add interest to all accounts.
-
The system must create a backup of account data when requested.
-
The system must restrict access after multiple incorrect PIN attempts.
-
The system must store and retrieve data using file handling to ensure persistence.
The Bank Management System must satisfy the following non-functional requirements to ensure performance, usability, and reliability:
-
Performance: The system should execute operations such as deposit, withdrawal, and search efficiently without noticeable delay.
-
Usability: The system should provide a simple and user-friendly command-line interface that is easy to understand and operate.
-
Reliability: The system must ensure accurate data handling and prevent data corruption during file operations.
-
Security: The system should protect user data through password authentication, PIN verification, and basic encryption techniques.
-
Maintainability: The code should be modular and well-structured to allow easy updates and modifications.
-
Portability: The system should be able to run on systems supporting C compilers, although some features may be platform-dependent.
-
Data Persistence: The system must store data in files so that information is retained even after the program is closed.
-
Scalability: The system should handle multiple accounts without significant performance degradation.
-
Error Handling: The system should handle invalid inputs and file errors gracefully without crashing.
-
createAccount()
Creates a new bank account with auto-generated account number. -
deposit()
Adds money to an existing account after PIN verification. -
withdraw()
Withdraws money with balance check and PIN authentication. -
display()
Displays all account details (Admin only). -
deleteAccount()
Deletes an account from the system (Admin only). -
interest()
Applies interest to all accounts. -
miniStatement()
Shows transaction history for a specific account. -
backup()
Creates a backup of account data. -
searchByAccNo()
Searches account using unique account number. -
searchByName()
Searches accounts by name (supports multiple results). -
verify()
Verifies account credentials (Account Number + PIN). -
update()
Updates account details in the file. -
logTransaction()
Records transaction details with timestamp. -
generateAccNo()
Generates unique account numbers automatically.
The Bank Management System is designed using a modular and structured approach. The system is divided into multiple functions, where each function is responsible for performing a specific task such as account creation, transaction handling, searching, and data management.
The core of the system is based on a structure named Account, which stores essential details like account number, account holder name, balance, and PIN. This structure is used throughout the program to manage user data.
The application follows a menu-driven design, where users interact with the system through a series of options. Based on the selected option, the corresponding function is executed.
The system uses file handling to store data persistently. Account details are stored in a binary file, and transaction records are stored in a separate file. Read, write, and update operations are performed using file pointers.
Security is integrated into the design through system-level password protection, role-based login, and PIN verification for transactions. Basic encryption is applied to sensitive data before storing it in files.
Overall, the design ensures separation of concerns, making the system organized, easy to understand, and maintainable.
The system uses file handling in C to store and manage data persistently. All account and transaction information is stored in external files, allowing data to remain secure even after the program is closed.
-
Account Data File (
bank.dat): This binary file stores all account records using theAccountstructure. Each record contains the account number, account holder name (encrypted), balance, and PIN. The file is used for reading, writing, updating, and deleting account information. -
Transaction File (
transactions.dat): This file stores all transaction logs in text format. Each entry includes account number, transaction type (deposit or withdrawal), amount, updated balance, and timestamp. It is used to generate mini statements. -
Temporary File (
temp.dat): This file is used during update and delete operations. Data is first written to the temporary file and then replaced with the original file to ensure safe modification. -
Backup File (
backup.dat): This file is created when the backup feature is used. It stores a copy of the account data to prevent data loss.
The system uses binary file operations (rb, wb, ab, rb+) for efficient storage and retrieval. Text file handling is used for transaction logs to maintain readability.
The Bank Management System implements several basic security mechanisms to protect user data and restrict unauthorized access.
-
System Password Protection: The system requires a predefined password before accessing the application. If the password is incorrect, the program terminates immediately.
-
Role-Based Login: The system provides two types of access: Admin and User. Each role has different permissions, ensuring controlled access to sensitive operations.
-
PIN Verification: Each account is protected by a PIN. Users must enter the correct PIN to perform transactions such as deposit and withdrawal.
-
Limited Login Attempts: The system restricts the number of incorrect PIN attempts. After three failed attempts, the account is temporarily locked to prevent unauthorized access.
-
Data Encryption: The account holder’s name is encrypted before storing it in the file and decrypted when displayed. A simple XOR-based encryption technique is used.
-
Secure Data Handling: File operations are performed carefully to avoid accidental data loss or corruption during read/write processes.
These mechanisms provide a basic level of security suitable for a console-based application and help demonstrate fundamental security concepts in programming.
The Bank Management System is divided into multiple modules, each responsible for a specific functionality. This modular approach improves code readability, maintainability, and scalability.
-
Authentication Module: Handles system password verification and role-based login for Admin and User access.
-
Account Management Module: Responsible for creating new accounts, deleting existing accounts, and displaying account details.
-
Transaction Module: Manages deposit and withdrawal operations with proper balance updates and validation.
-
Verification Module: Verifies account number and PIN before allowing any transaction, ensuring secure access.
-
Search Module: Provides functionality to search accounts by account number or account holder name.
-
Interest Module: Calculates and adds interest to all accounts in the system.
-
Transaction Log Module: Records all financial transactions with date and time in a separate file for tracking purposes.
-
Mini Statement Module: Displays transaction history for a specific account using stored transaction logs.
-
Backup Module: Creates a backup of account data to prevent data loss.
-
File Handling Module: Manages reading, writing, updating, and deleting data from files efficiently.
Each module works independently but is integrated into the main system through a menu-driven interface.
The Bank Management System implements role-based access control to ensure that different types of users have appropriate permissions within the system.
-
Admin Role: The administrator has full control over the system. Admin users can create new accounts, view all account details, delete accounts, and access most system functionalities. This role is intended for managing and maintaining the system.
-
User Role: Normal users have limited access. They can perform operations such as deposit, withdrawal, viewing their mini statement, and searching for account details. However, they are restricted from performing administrative tasks like creating or deleting accounts.
-
Access Restrictions: Certain operations are restricted based on the user role. If a user without proper permissions tries to access restricted features, the system denies access and displays an appropriate message.
-
Authentication Control: Access to the system is protected through login credentials. Users must provide the correct username and password to enter the system, ensuring that only authorized individuals can use it.
This role-based system helps maintain security and ensures that sensitive operations are only performed by authorized users.
Bank-Management-System/
│
├── screenshots/ # All example's
│
├── bank.c # Main source code
├── bank.dat # Stores account data (binary file)
├── transactions.dat # Stores transaction history
├── backup.dat # Backup file
└── README.md # Project documentationFollow the steps below to install and set up the Bank Management System on your system:
-
Step 1: Install a C Compiler
Ensure that a C compiler such as GCC (MinGW for Windows) is installed on your system. -
Step 2: Download the Source Code
Copy or download the project source code file (e.g.,bank.c) into a folder on your system. -
Step 3: Open Terminal / Command Prompt
Navigate to the folder where the source code is stored. -
Step 4: Compile the Program
Use the following command to compile the code:gcc bank.c -o bank -
Step 5: Verify Compilation After successful compilation, an executable file (e.g.,
bank.exeon Windows) will be created in the same directory. -
Step 6: Required Files No pre-existing files are required. The system will automatically create necessary data files (
bank.dat,transactions.dat, etc.) during execution.
Ensure that all files are in the same directory for proper functioning of the system.
Follow the steps below to execute the Bank Management System after successful installation:
-
Step 1: Open Terminal / Command Prompt Navigate to the directory where the compiled executable file is located.
-
Step 2: Run the Program Execute the program using the following command:
./bank(On Windows, you can also run
bank.exe) -
Step 3: Enter System Password The system will prompt for a system password. Enter the correct password to proceed.
-
Step 4: Login to the System Enter your username and password. Choose the appropriate role (Admin or User) based on your credentials.
-
Step 5: Access Menu After successful login, the main menu will be displayed with multiple options.
-
Step 6: Perform Operations Select the desired operation by entering the corresponding number and follow on-screen instructions.
-
Step 7: Exit the Program Choose the exit option from the menu to safely terminate the program.
Ensure that all input values are entered correctly to avoid errors during execution.
- Open terminal / command prompt in project folder
- Compile the program:
gcc bank.c -o bank
- Run the executable:
./bank
bank@123- Username:
admin - Password:
1234
- Username:
user - Password:
1111
📝 Note: Account PIN is set during account creation by the user.
The Bank Management System follows a menu-driven approach where users interact with the system by selecting options from a list. After successful login, the main menu is displayed with multiple operations.
- Create Account
- Deposit Money
- Withdraw Money
- Display All Accounts
- Delete Account
- Add Interest
- Mini Statement
- Backup Data
- Search Account
- Exit
- The system starts by asking for the system password.
- After successful verification, the user is prompted to log in as Admin or User.
- Based on the role, access to certain features is granted or restricted.
- The main menu is displayed, and the user selects an option.
- The system executes the corresponding function.
- After completing the operation, the menu is displayed again.
- This process continues until the user selects the exit option.
When the user selects the search option, a sub-menu appears:
- Search by Account Number
- Search by Account Holder Name
The system processes the selected search method and displays the result accordingly.
The Bank Management System uses file handling in C to manage and store data efficiently. Different files are used for specific purposes, ensuring organized data management.
-
bank.dat: This is the primary binary file used to store all account records. Each record is stored using the
Accountstructure, which includes account number, name (encrypted), balance, and PIN. The file supports operations such as read, write, and update. -
transactions.dat: This is a text file used to store transaction logs. Each transaction entry includes account number, transaction type, amount, updated balance, and timestamp. It is mainly used for generating mini statements.
-
temp.dat: This temporary file is used during delete and update operations. Data is first written into this file and then replaced with the original file to ensure safe modifications.
-
backup.dat: This file is created when the backup feature is used. It stores a copy of all account data to prevent loss of important information.
- rb (read binary): Used to read data from binary files.
- wb (write binary): Used to create or overwrite files.
- ab (append binary): Used to add new records to existing files.
- rb+ (read and write binary): Used to update existing records.
- r (read text): Used to read transaction logs.
- a (append text): Used to add new transaction entries.
Proper file handling ensures data persistence, integrity, and efficient access throughout the system.
The Bank Management System has certain limitations due to its simplicity and console-based implementation:
-
The system uses basic security mechanisms and does not implement advanced encryption techniques for sensitive data.
-
It does not support multi-user or concurrent access, as it is designed for single-user execution.
-
The user interface is command-line based and lacks a graphical user interface (GUI), which may reduce usability for some users.
-
Error handling is limited and may not cover all edge cases or invalid inputs.
-
The system stores data locally using files and does not use a database, which may affect scalability for large datasets.
-
There is no real-time validation or network-based functionality such as online banking features.
-
Backup and recovery mechanisms are basic and do not include automated scheduling or restore options.
These limitations highlight areas where the system can be improved in future versions.
The Bank Management System can be further improved by implementing the following enhancements:
-
Graphical User Interface (GUI): Develop a user-friendly interface using technologies such as GTK or integrate with frontend tools to improve user experience.
-
Database Integration: Replace file handling with a database system such as MySQL or SQLite for better data management and scalability.
-
Advanced Security: Implement stronger encryption techniques, secure password storage (hashing), and multi-factor authentication.
-
Multi-User Support: Enable concurrent access to allow multiple users to use the system simultaneously.
-
Online Functionality: Extend the system to support network-based operations such as online transactions and remote access.
-
Error Handling Improvements: Add comprehensive validation and exception handling to make the system more robust.
-
Automated Backup and Recovery: Implement automatic backup scheduling and recovery mechanisms.
-
Transaction Filters: Allow users to filter transaction history by date, type, or amount.
-
Audit Logs: Maintain detailed logs for administrative actions for better tracking and accountability.
These enhancements will make the system more powerful, secure, and closer to real-world banking applications.
The Bank Management System is a simple yet effective application that demonstrates the fundamental concepts of programming using the C language. It successfully implements core banking functionalities such as account management, transactions, data storage, and basic security mechanisms.
The project highlights the use of structures, file handling, modular programming, and user interaction through a menu-driven interface. It also provides a practical understanding of how real-world systems manage and process data.
Although the system has some limitations, it serves as a strong foundation for building more advanced applications. With further improvements and enhancements, it can be extended into a more robust and feature-rich banking solution.
Overall, this project is a valuable learning experience and showcases the practical application of programming concepts in solving real-world problems.
Name: Mohan Singh Parmar
Role: Cybersecurity Learner & Former Frontend Developer
Location: Rajasthan, India
Description: This project was developed as part of academic learning and skill development in C programming. It demonstrates practical implementation of file handling, data management, and basic security concepts in a banking system.




