Design a C program to act as a simple phonebook application. Phonebook entries consist of names and phone numbers stored in a Linked list.
Create functions to:
Add a new contact: Prompt for a name and phone number, validate them (e.g., minimum name/phone number length), and append a new line with the data to the file.
Display all contacts: Read and display each contact's name and phone number in a clear format.
Search for a contact by name: Allow the user to enter a name. Search for matching names or partial names (using string search algorithms like strstr) and display corresponding entries.
Delete a contact: Provide an option to delete a contact by name. Find the entry, remove its line from the file, and rewrite the remaining content.
Design a C program to act as a simple phonebook application.
Phonebook entries consist of names and phone numbers stored in a Linked list.
Add a new contact: Prompt for a name and phone number, validate them (e.g., minimum name/phone number length), and append a new line with the data to the file.
Display all contacts: Read and display each contact's name and phone number in a clear format.
Search for a contact by name: Allow the user to enter a name. Search for matching names or partial names (using string search algorithms like strstr) and display corresponding entries.
Delete a contact: Provide an option to delete a contact by name. Find the entry, remove its line from the file, and rewrite the remaining content.