A robust, file-based ATM simulation written in C. This project demonstrates core programming concepts including File I/O, Data Structures, Authentication Logic, and Input Validation.
- Multi-User Support: Handles multiple accounts with unique account numbers.
- Persistent Storage: Account data (PINs and balances) are saved to
accounts.txt. - Transaction History: Every deposit or withdrawal is logged to a user-specific text file (e.g.,
history_1001.txt). - Security: Implements a 3-try login limit and 4-digit PIN verification.
- Input Protection: Includes buffer clearing to prevent infinite loops from invalid character inputs.
The system allows users to:
- Create an Account: Automated account number generation.
- Login: Secure access to existing accounts.
- Check Balance: Real-time balance inquiries.
- Deposit/Withdraw: Update funds with instant file synchronization.
- Change PIN: Securely update credentials.
- View History: Read previous transactions from local logs.
| File | Description |
|---|---|
main.c |
The core logic and source code. |
accounts.txt |
Flat-file database storing account credentials and balances. |
history_XXXX.txt |
Transaction logs generated per account number. |
- A C compiler (GCC, Clang, or MinGW).
Open your terminal and run:
gcc main.c -o atm_system
./atm_system
-
Encryption: Hash PINs before saving them to the file.
-
Admin Mode: A master login to view all system accounts.
-
Timestamps: Add real-time dates to the transaction history using <time.h>.
-
GUI: Transition from a CLI to a graphical interface using libraries like Raylib or GTK.