Professional Documents
Culture Documents
Soham DSU
Soham DSU
GUIDE BY:-D.B.PATIL
1
CONTACT MANAGEMENT SYSTEM
2
CONTACT MANAGEMENT SYSTEM
3
CONTACT MANAGEMENT SYSTEM
4
CONTACT MANAGEMENT SYSTEM
5
CONTACT MANAGEMENT SYSTEM
Name
•
Phone Number
•
Address
•
Edit a Contact5.
Delete a Contact6.
Exit----------------------------------------------------------------------------------
--
6
CONTACT MANAGEMENT SYSTEM
Soursc code:-
#include <stdio.h>
#include <string.h>
struct Contact {
char name[50];
char phone[20];
char email[50];
char address[100];
};
return;
7
CONTACT MANAGEMENT SYSTEM
printf("Name: ");
printf("Phone: ");
printf("Email: ");
printf("Address: ");
(*count)++;
if (count == 0) {
return;
printf("Contact List:\n");
8
CONTACT MANAGEMENT SYSTEM
if (count == 0) {
return;
char searchName[50];
int found = 0;
if (strcmp(contacts[i].name, searchName) == 0) {
printf("Contact found:\n");
9
CONTACT MANAGEMENT SYSTEM
found = 1;
break;
if (!found) {
if (count == 0) {
return;
char searchName[50];
int found = 0;
10
CONTACT MANAGEMENT SYSTEM
if (strcmp(contacts[i].name, searchName) == 0) {
printf("Name: ");
printf("Phone: ");
printf("Email: ");
printf("Address: ");
found = 1;
break;
if (!found) {
11
CONTACT MANAGEMENT SYSTEM
if (*count == 0) {
return;
char searchName[50];
int found = 0;
if (strcmp(contacts[i].name, searchName) == 0) {
(*count)--;
found = 1;
break;
12
CONTACT MANAGEMENT SYSTEM
if (!found) {
int main() {
int count = 0;
int choice;
while (1) {
printf("6. Exit\n");
scanf("%d", &choice);
switch (choice) {
case 1:
13
CONTACT MANAGEMENT SYSTEM
addContact(contacts, &count);
break;
case 2:
listContacts(contacts, count);
break;
case 3:
searchContact(contacts, count);
break;
case 4:
editContact(contacts, count);
break;
case 5:
deleteContact(contacts, &count);
break;
case 6:
return 0;
default:
return 0;
14
CONTACT MANAGEMENT SYSTEM
15
CONTACT MANAGEMENT SYSTEM
16
CONTACT MANAGEMENT SYSTEM
17
CONTACT MANAGEMENT SYSTEM
18
CONTACT MANAGEMENT SYSTEM
4] Edit a Contact:
To edit a previously saved contact there is optionnumber four i.e. (4).
We can change name, phone number, addressand email address means
all the attributes.
19
CONTACT MANAGEMENT SYSTEM
20
CONTACT MANAGEMENT SYSTEM
5] Delete a Contact:
To delete a particular contact we can use deleteoption number five (5).
21
CONTACT MANAGEMENT SYSTEM
22
CONTACT MANAGEMENT SYSTEM
6] Exit:
To Exit from the program we can use exit option (0).
23
CONTACT MANAGEMENT SYSTEM
24