Skip to content

AmarCM/AddressBook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Address Book — C Console Application

A console-based Address Book application written in C. Manage contacts with full CRUD operations, sorting, validation, and persistent file storage.

Features

  • 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

Project Structure

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)

Getting Started

Prerequisites

  • GCC compiler
  • Linux / Unix environment (or WSL on Windows)

Build & Run

# 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

Usage

+----------------------------------+
|         ADDRESS BOOK MENU        |
+----------------------------------+
| 1. Create contact                |
| 2. Search contact                |
| 3. Edit contact                  |
| 4. Delete contact                |
| 5. List all contacts             |
| 6. Save contacts                 |
+----------------------------------+

Technologies Used

  • Language: C
  • Concepts: Structures, File Handling, String Manipulation, Modular Programming, Dynamic Arrays, Input Validation

Author

Amar C M
Embedded Systems Engineer
LinkedIn | amarcm1502@gmail.com

About

Console-based Address Book application in C — add, search, edit, delete, sort, and save contacts with file-based persistent storage

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages