{"id":3854,"date":"2025-06-09T06:22:36","date_gmt":"2025-06-09T06:22:36","guid":{"rendered":"https:\/\/thecompanyboy.com\/?p=3854"},"modified":"2025-06-09T06:22:36","modified_gmt":"2025-06-09T06:22:36","slug":"project-of-contact-management-system-in-c-programming-with-code-source","status":"publish","type":"post","link":"https:\/\/www.reilsolar.com\/drive\/project-of-contact-management-system-in-c-programming-with-code-source\/","title":{"rendered":"Project Of CONTACT MANAGEMENT SYSTEM IN C PROGRAMMING WITH SOURCE CODE"},"content":{"rendered":"<div id=\"pl-3854\" class=\"panel-layout\">\n<div id=\"pg-3854-0\" class=\"panel-grid panel-no-style\" data-style=\"{&quot;background_image_attachment&quot;:false,&quot;background_display&quot;:&quot;tile&quot;,&quot;cell_alignment&quot;:&quot;flex-start&quot;}\" data-ratio=\"1\" data-ratio-direction=\"right\">\n<div id=\"pgc-3854-0-0\" class=\"panel-grid-cell\" data-weight=\"1\">\n<div id=\"panel-3854-0-0-0\" class=\"so-panel widget widget_black-studio-tinymce widget_black_studio_tinymce panel-first-child panel-last-child\" data-index=\"0\" data-style=\"{&quot;background_image_attachment&quot;:false,&quot;background_display&quot;:&quot;tile&quot;}\">\n<div class=\"textwidget\">\n<p>File handling, data structure, functions, and pointers are the main things which make up this simple c mini project\u00a0The key features of contact management system are listed below:<\/p>\n<ul>\n<li>Add new contacts: with information such as name, phone number, address, and email<\/li>\n<li>List all contacts: lists all the contacts stored in file with their respective contact details<\/li>\n<li>Search contacts: based on name and phone number<\/li>\n<li>Edit contacts: edit information given while adding the contacts \u2013 name, phone number, address, and email<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"pg-3854-1\" class=\"panel-grid panel-no-style\" data-style=\"{&quot;background_image_attachment&quot;:false,&quot;background_display&quot;:&quot;tile&quot;,&quot;cell_alignment&quot;:&quot;flex-start&quot;}\" data-ratio=\"1\" data-ratio-direction=\"right\">\n<div id=\"pgc-3854-1-0\" class=\"panel-grid-cell\" data-weight=\"1\">\n<div id=\"panel-3854-1-0-0\" class=\"so-panel widget widget_black-studio-tinymce widget_black_studio_tinymce panel-first-child panel-last-child\" data-index=\"1\" data-style=\"{&quot;background_image_attachment&quot;:false,&quot;background_display&quot;:&quot;tile&quot;}\">\n<div class=\"textwidget\">\n<p><strong>AUTHOR<\/strong>: UNKNOWN<\/p>\n<p><strong>SIZE OF FILE:<\/strong>\u00a0 UNKNOWN<\/p>\n<p><strong>NUMBER OF PAGES:<\/strong>UNKNOWN<\/p>\n<p><strong>LANGUAGE:\u00a0<\/strong>\u00a0ENGLISH<\/p>\n<p><strong>CATEGORY :<\/strong>\u00a0PROJECT<\/p>\n<p><strong>PAGE QUALITY:<\/strong>\u00a0GOOD<\/p>\n<p><strong><mark>Project Of Contact Management System in \u2018C\u2019 Language Download Link<\/mark><\/strong><\/p>\n<p>A <strong>Contact Management System (CMS)<\/strong> is a useful project for managing contact information like names, phone numbers, and email addresses. Here&#8217;s a complete C program for a basic CMS with functionalities such as adding, searching, listing, and deleting contacts.<\/p>\n<h3>Features:<\/h3>\n<ol>\n<li><strong>Add a Contact<\/strong>: Store contact information.<\/li>\n<li><strong>List Contacts<\/strong>: Display all saved contacts.<\/li>\n<li><strong>Search Contacts<\/strong>: Find a contact by name.<\/li>\n<li><strong>Delete a Contact<\/strong>: Remove a contact by name.<\/li>\n<li><strong>Exit<\/strong>: Save and close the program.<\/li>\n<\/ol>\n<h3>Source Code<\/h3>\n<p>Here\u2019s the complete implementation:<\/p>\n<pre><code class=\"language-c\">#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\n#include &lt;string.h&gt;\n\n#define MAX 100\n#define NAME_LEN 50\n#define PHONE_LEN 15\n#define EMAIL_LEN 50\n\ntypedef struct {\n    char name[NAME_LEN];\n    char phone[PHONE_LEN];\n    char email[EMAIL_LEN];\n} Contact;\n\nContact contacts[MAX];\nint totalContacts = 0;\n\nvoid addContact() {\n    if (totalContacts &gt;= MAX) {\n        printf(\"Contact list is full!\\n\");\n        return;\n    }\n    printf(\"Enter Name: \");\n    scanf(\" %[^\\n]\", contacts[totalContacts].name);\n    printf(\"Enter Phone: \");\n    scanf(\"%s\", contacts[totalContacts].phone);\n    printf(\"Enter Email: \");\n    scanf(\"%s\", contacts[totalContacts].email);\n    totalContacts++;\n    printf(\"Contact added successfully!\\n\");\n}\n\nvoid listContacts() {\n    if (totalContacts == 0) {\n        printf(\"No contacts available.\\n\");\n        return;\n    }\n    printf(\"\\nList of Contacts:\\n\");\n    printf(\"---------------------------------------------------\\n\");\n    printf(\"%-20s %-15s %-30s\\n\", \"Name\", \"Phone\", \"Email\");\n    printf(\"---------------------------------------------------\\n\");\n    for (int i = 0; i &lt; totalContacts; i++) {\n        printf(\"%-20s %-15s %-30s\\n\", contacts[i].name, contacts[i].phone, contacts[i].email);\n    }\n    printf(\"---------------------------------------------------\\n\");\n}\n\nvoid searchContact() {\n    char searchName[NAME_LEN];\n    printf(\"Enter name to search: \");\n    scanf(\" %[^\\n]\", searchName);\n    int found = 0;\n    for (int i = 0; i &lt; totalContacts; i++) {\n        if (strcmp(contacts[i].name, searchName) == 0) {\n            printf(\"\\nContact Found:\\n\");\n            printf(\"Name: %s\\n\", contacts[i].name);\n            printf(\"Phone: %s\\n\", contacts[i].phone);\n            printf(\"Email: %s\\n\", contacts[i].email);\n            found = 1;\n            break;\n        }\n    }\n    if (!found) {\n        printf(\"Contact not found.\\n\");\n    }\n}\n\nvoid deleteContact() {\n    char deleteName[NAME_LEN];\n    printf(\"Enter name to delete: \");\n    scanf(\" %[^\\n]\", deleteName);\n    int found = 0;\n    for (int i = 0; i &lt; totalContacts; i++) {\n        if (strcmp(contacts[i].name, deleteName) == 0) {\n            for (int j = i; j &lt; totalContacts - 1; j++) {\n                contacts[j] = contacts[j + 1];\n            }\n            totalContacts--;\n            printf(\"Contact deleted successfully!\\n\");\n            found = 1;\n            break;\n        }\n    }\n    if (!found) {\n        printf(\"Contact not found.\\n\");\n    }\n}\n\nvoid saveContactsToFile() {\n    FILE *file = fopen(\"contacts.dat\", \"wb\");\n    if (file == NULL) {\n        printf(\"Error saving contacts!\\n\");\n        return;\n    }\n    fwrite(&amp;totalContacts, sizeof(int), 1, file);\n    fwrite(contacts, sizeof(Contact), totalContacts, file);\n    fclose(file);\n}\n\nvoid loadContactsFromFile() {\n    FILE *file = fopen(\"contacts.dat\", \"rb\");\n    if (file != NULL) {\n        fread(&amp;totalContacts, sizeof(int), 1, file);\n        fread(contacts, sizeof(Contact), totalContacts, file);\n        fclose(file);\n    }\n}\n\nint main() {\n    int choice;\n    loadContactsFromFile();\n\n    do {\n        printf(\"\\nContact Management System\\n\");\n        printf(\"1. Add Contact\\n\");\n        printf(\"2. List Contacts\\n\");\n        printf(\"3. Search Contact\\n\");\n        printf(\"4. Delete Contact\\n\");\n        printf(\"5. Exit\\n\");\n        printf(\"Enter your choice: \");\n        scanf(\"%d\", &amp;choice);\n\n        switch (choice) {\n        case 1:\n            addContact();\n            break;\n        case 2:\n            listContacts();\n            break;\n        case 3:\n            searchContact();\n            break;\n        case 4:\n            deleteContact();\n            break;\n        case 5:\n            saveContactsToFile();\n            printf(\"Exiting the program. Goodbye!\\n\");\n            break;\n        default:\n            printf(\"Invalid choice. Please try again.\\n\");\n        }\n    } while (choice != 5);\n\n    return 0;\n}\n<\/code><\/pre>\n<h3>Key Features:<\/h3>\n<ol>\n<li><strong>Data Persistence<\/strong>: Contacts are saved to a file (<code>contacts.dat<\/code>) and loaded automatically when the program starts.<\/li>\n<li><strong>User-Friendly Interface<\/strong>: Easy-to-use menu-driven approach.<\/li>\n<\/ol>\n<h3>Compilation and Execution:<\/h3>\n<ol>\n<li>Save the code in a file named <code>contact_management.c<\/code>.<\/li>\n<li>Compile it using:\n<pre><code class=\"language-bash\">gcc contact_management.c -o contact_management\n<\/code><\/pre>\n<\/li>\n<li>Run the program:\n<pre><code class=\"language-bash\">.\/contact_management\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<p>This program is simple yet functional and can be extended to include additional features like contact sorting, advanced search options, or a graphical interface.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>File handling, data structure, functions, and pointers are the main things which make up this simple c mini project\u00a0The key features of contact management system are listed below: Add new contacts: with information such as name, phone number, address, and email List all contacts: lists all the contacts stored in file with their respective contact [&hellip;]<\/p>\n","protected":false},"author":50,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2101],"tags":[19,506],"class_list":["post-3854","post","type-post","status-publish","format-standard","hentry","category-contact-management-system","tag-project-of-contact-management-system-in-c-language","tag-project-of-contact-management-system-in-c-language-download-free-pdf"],"_links":{"self":[{"href":"https:\/\/www.reilsolar.com\/drive\/wp-json\/wp\/v2\/posts\/3854","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.reilsolar.com\/drive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.reilsolar.com\/drive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.reilsolar.com\/drive\/wp-json\/wp\/v2\/users\/50"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reilsolar.com\/drive\/wp-json\/wp\/v2\/comments?post=3854"}],"version-history":[{"count":0,"href":"https:\/\/www.reilsolar.com\/drive\/wp-json\/wp\/v2\/posts\/3854\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.reilsolar.com\/drive\/wp-json\/wp\/v2\/media?parent=3854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.reilsolar.com\/drive\/wp-json\/wp\/v2\/categories?post=3854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.reilsolar.com\/drive\/wp-json\/wp\/v2\/tags?post=3854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}