Skip to content

EnzoGiacomini/Phone-Book

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Smart Digital Phonebook (Agenda Digital)

A CLI-based contact management system developed in C that demonstrates the practical use of singly linked lists, dynamic memory allocation, and file persistence.

πŸ“‹ Features

  • Dynamic Contact Management: Add, remove, and search for contacts by name using a linked list structure.
  • Data Persistence: Automatically loads data from agenda.txt at startup and saves all changes upon exiting.
  • Manual Reordering: Allows users to swap the positions of two contacts within the list while maintaining pointer integrity.
  • Input Validation: Includes specific logic to validate phone number formats (XX XXXXXXXXX) and email addresses (checking for the @ symbol).
  • Safety Backups: Generates a agenda_backup.txt before overwriting the main database to prevent data loss.
  • Memory Efficiency: Implements a cleanup function to free all allocated RAM before the program terminates.

πŸ› οΈ Technical Details

  • Language: C.
  • Data Structure: Singly Linked List (struct Contato).
  • Key Algorithms:
    • Node insertion at the end of the list.
    • Pointer manipulation for node swapping (reordering).
    • Sequential search for contact retrieval.

πŸš€ How to Run

  1. Clone the repository:

    git clone [https://github.com/your-username/your-repo-name.git](https://github.com/your-username/your-repo-name.git)
    cd your-repo-name
  2. Compile the project: You can use gcc to compile the source files:

    gcc phonebook.c funcoes.c -o phonebook
  3. Run the application:

    ./phonebook

πŸ“ Project Structure

  • phonebook.c: Contains the main execution loop and menu logic.
  • funcoes.c: Implementation of all core features (CRUD, sorting, file I/O).
  • funcoes.h: Header file containing the Contato struct definition and function prototypes.

Developed by: Enzo Giacomin & Pedro Henrique Mognon De Bortoli.

About

A dynamic C-based contact management system using singly linked lists, featuring automated file persistence, manual contact reordering, and data validation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages