A console-based Address Book application written in C. Manage contacts with full CRUD operations, sorting, validation, and persistent file storage.
- Create contacts with name, phone number, and email
- Search contacts by name
- Edit existing contact details
- Delete contacts
- List all contacts with sorting options:
- Sort by Name
- Sort by Phone
- Sort by Email
- Normal listing
- Save contacts to file for persistent storage
- Input Validation — duplicate phone/email detection, name format checks
AddressBook/
├── main.c # Entry point, menu-driven interface
├── contact.c # Core CRUD operations (create, search, edit, delete, list)
├── contact.h # Structs and function declarations
├── file.c # File handling — save/load contacts
├── file.h # File function declarations
├── validation.c # Input validation (name, phone, email)
├── populate.c # Helper to pre-populate sample contacts
├── populate.h # Populate function declaration
└── contacts.txt # Persistent contact storage (auto-generated)
- GCC compiler
- Linux / Unix environment (or WSL on Windows)
# Clone the repository
git clone https://github.com/<your-username>/AddressBook.git
cd AddressBook
# Compile
gcc main.c contact.c file.c validation.c populate.c -o addressbook
# Run
./addressbook+----------------------------------+
| ADDRESS BOOK MENU |
+----------------------------------+
| 1. Create contact |
| 2. Search contact |
| 3. Edit contact |
| 4. Delete contact |
| 5. List all contacts |
| 6. Save contacts |
+----------------------------------+
- Language: C
- Concepts: Structures, File Handling, String Manipulation, Modular Programming, Dynamic Arrays, Input Validation
Amar C M
Embedded Systems Engineer
LinkedIn | amarcm1502@gmail.com