A modular ATM-based banking system implemented in C using multiple source files and a header file.
This project demonstrates structured programming, function modularization, pointer usage, and separate compilation in C.
This project simulates a basic ATM system with PIN authentication and core banking operations.
The application is divided into multiple source files to maintain modular design and clean code structure.
The system requires a valid PIN to access banking operations and allows the user to perform basic account transactions through a console interface.
- User must enter a PIN to access the ATM.
- Maximum of 3 attempts allowed.
- If incorrect PIN is entered 3 times, the program exits.
- Allows the user to deposit money.
- Only positive amounts are accepted.
- Invalid deposits are rejected.
- Allows the user to withdraw money.
- Withdrawal amount must:
- Be greater than 0
- Not exceed current balance.
- Prevents overdrawing the account.
- Displays the current account balance.
- Allows the user to exit the ATM system safely.
ATM.c→ Handles login system and main ATM menu.Account.c→ Handles deposit, withdrawal, and balance operations.Account.h→ Contains function declarations.- Demonstrates header file usage and separate compilation.
Simple-Banking-System/
│
├── ATM.c
├── Account.c
├── Account.h
└── README.md
Clone this repository:
git clone https://github.com/codexbutcher/Simple-Banking-System.gitNavigate into the project directory:
cd Simple-Banking-SystemUsing GCC:
gcc ATM.c Account.c -o atmatm.exe./atm- Run the program.
- Enter the PIN: 1234
- After successful login, choose from the menu:
1→ Deposit2→ Withdraw3→ Check Balance4→ Exit
- Follow the on-screen instructions.
- If the wrong PIN is entered 3 times, the program terminates.
- Functions
- Pointers (pass by reference)
- Header files
- Separate compilation
- Switch-case statements
- Loops (do-while, while)
- Conditional logic
This project was built to strengthen understanding of:
- Modular programming in C
- Code organization across multiple files
- Function declarations and definitions
- Basic ATM system logic implementation