-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact.h
More file actions
29 lines (24 loc) · 884 Bytes
/
contact.h
File metadata and controls
29 lines (24 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef CONTACT_H
#define CONTACT_H
#define MAX_CONTACTS 100 // defining contact limit to 100
#include<stdio.h>
typedef struct {
char name[50];
char phone[20];
char email[50];
} Contact;// structure variable named as Contact
typedef struct {
Contact contacts[100];
int contactCount;
} AddressBook; // structure variable named AddressBook
int createContact(AddressBook *addressBook);
int validatename(char *Name);
int validatephone(char *num, AddressBook *addressBook);
int validateemail(char *mail, AddressBook *addressBook);
int searchContact(AddressBook *addressBook);
void editContact(AddressBook *addressBook);
void deleteContact(AddressBook *addressBook);
void listContacts(AddressBook *addressBook, int sortCriteria);
void initialize(AddressBook *addressBook);
void saveContactsToFile(AddressBook *AddressBook);
#endif