0% found this document useful (0 votes)
96 views

Contect Management System Project

This document is a project report on a contact management system submitted by three students - Ayanava Dey, Sougata Pal, and Subrata Pradhan - to their lecturer Bhawna Sharma in partial fulfillment of their Bachelor of Technology degree in computer science and engineering. The report includes an introduction to the system, scope of the project, field study conducted on contact management, importance of contact information, problems with contact selection and data entry, and hardware and software requirements. It also includes the source code and results of the project.

Uploaded by

GOURAB PANDIT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views

Contect Management System Project

This document is a project report on a contact management system submitted by three students - Ayanava Dey, Sougata Pal, and Subrata Pradhan - to their lecturer Bhawna Sharma in partial fulfillment of their Bachelor of Technology degree in computer science and engineering. The report includes an introduction to the system, scope of the project, field study conducted on contact management, importance of contact information, problems with contact selection and data entry, and hardware and software requirements. It also includes the source code and results of the project.

Uploaded by

GOURAB PANDIT
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

Project Report

on
“CONTACT MANAGEMENT SYSTEM”
Submitted in Partial fulfilment of requirement for the awards of degree of

BACHELOR OF TECHNOLOGY
IN

COMPUTER SCIENCE AND ENGINEERING

2018 - 2022

Submitted To Submitted By
Ms. Bhawna Sharma Ayanava Dey
Lecturer, Dept. of CSE (18-cse-33)
Sougata Pal
(18-cse-34)
Subrata Pradhan
(18-cse-35)

DEPERTMENT OF COMPUTER SCIENCE AND ENGINEERING


B.M. COLLEGE OF TECH. & MGMT., FARUKHNAGAR, GURGAON
AFFIALATED TO: Maharishi Dayanand University, Rohtak
ACKNOWLEDGEMENT

The Project work entitled “CONTECT MANAGEMENT SYSTEM” was


carried out at BM College of Technology and Management, Gurgaon under the
guidance of Mrs. Bhawna Sharma.

I gratefully acknowledge the guidance of our project in charge for the


successful completion of the project. The support of Head of the Department,
Director, Faculty and the laboratory staff in Execution of project is gratefully
acknowledged.

The support and encouragement given from my family and my friends was
needed most, during the project execution. I am really thankful to them. And
Lastly I would like to thank each and Every person who helped me directly or
indirectly for the successful completion of this project.

AYANAVA DEY
(18-cse-33)

SOUGATA PAL
(18-cse-34)

SUBRATA PRADHAN
(18-cse-35)

BMCTM, Gurgaon
CANDIDATE’S DECLERATION

I hereby state that the work which is presented in this report entitled
" CONTECT MANAGEMENT SYSTEM " by Ayanava Dey (18-CSE-
33), Sougata Pal (18-CSE-34), Subrata Pradhan (18-CSE-35), for the
fulfilment of requirement for Award of the degree of Bachelor of
Technology in Computer Science and Engineering submitted to Dept. of
CSE, BM College of Technology and management, Farukhnagar is a
record of an authentic work carried out During the period from Feb 2022 to
June 2022 under the supervision of Mrs. Bhawna Sharma

AYANAVA DEY
(18-cse-33)

SOUGATA PAL
(18-cse-34)

SUBRATA PRADHAN
(18-cse-35)

BMCTM, Gurgaon

This is to certify that above statement made by candidate is correct to the best of
my knowledge and belief.

(Project Guide)

B.Tech Viva-Voce Examination has been held on ……/……/………

HOD (Project Guide)


(Depertment of CSE)
1. Introduction
1.1 Introduction to system
1.2 Scope of System
1.3 Field Study of Contact Management

2. The Value of Contact Information


2.1 Problems
2.2 Contact Selection
2.3 Data Entry
2.4 Diversity of Tools
2.5 Criteria for Determining

3. Comparision of Field and Lab Studies

4. Design and Theory Implications

5. Hardware and Software Requirements

6. Source code

7. Result
ABSTRACT
Much of our daily communication activity involves managing
interpersonal communications and relationships. Despite its
importance, this activity of contact management is poorly understood.
We report on field and lab studies that begin to illuminate it. A field
study of business professionals confirmed the importance of contact
management and revealed a major difficulty: selecting important
contacts from the large set of people with whom one communicates.
These interviews also showed that communication history is a key
resource for this task. Informants identified several history-based
criteria that they considered useful. We conducted a lab study to test
how well these criteria predict contact importance. Subjects identified
important contacts from their email archives. We then analyzed their
email to extract features for all contacts. Reciprocity, recency and
longevity of email interaction proved to be strong predictors of
contact importance. The experiment also identified another contact
management problem: removing ‘stale’ contacts from long term
archives. We discuss the design and theoretical implications of these
results.

1.1 INTRODUCTION

Theorizing about asynchronous communication has been dominated


by comparisons with faceto-face communication . Early
asynchronous theories emphasized media differences arguing that
asynchronous communication differs from face-to-face
communication because of the absence of non-verbal information
afforded by gaze and gesture. However, the emphasis on media
differences leaves other crucial aspects of asynchronous
communication unexamined, particularly those that stem from its
persistent nature. We explore those persistent aspects of
asynchronous communication in this paper. Research on email,
voicemail, and Usenet has revealed various critical features of
asynchronous, technologically mediated interpersonal conversations.
These conversations consist of multiple messages exchanged over a
fairly extended period of time: days, weeks, or even months. This
extension of conversations over time implies that people are typically
engaged in multiple conversations at any given time. And each
conversation often involves multiple people. These properties lead to
significant problems of conversation management. People find it
difficult to keep track of the content and status of their multiple
conversations, as well as the identity, contact information, and
expertise of all their conversational partners. Maintaining knowledge
of one’s contacts is a significant problem in its own right we refer to
this problem as contact management. Contact management is clearly
complex. A major problem is that people are exposed to an
unmanageable number of potential contacts. This is exacerbated by
widespread use of distribution lists . It would be both onerous and
unnecessary to store detailed information about all these potential
contacts. As a result, individuals must decide:
(a) which of these potential contacts are important enough to retain
information about; and (b) what sorts of information to retain about
these chosen contacts.
1.2 SCOPE OF THE SYSTEM

The system will be a Stand-Alone System for Contect Management


System Unit of GALGOTIAS UNIVERSITY.

This system will be designed to minimize the manual work in


maintaining Contect details, Phone number and all other activities
under phone contect system.

It aims to maximize the productivity and provide improved managed


System. This System will be easy to understand and use.

More specifically, this system is designed to allow an admin to manage


the records of stocks and goods.

The software will facilitate creation of different Reports such as


Expense and several other Reports.

1.3 FIELD STUDY OF CONTACT MANAGEMENT

We present new findings about contact management derived from a


field study of workplace communication practices. Other aspects of
this study have been reported elsewhere . The study had two related
goals:
(1) to identify the main problems informants experienced with
current communication applications; and
(2) to document the key strategies that users had evolved to address
these problems. The study consisted of semi-structured interviews
and observations of 20 business professionals. They included
financial analysts, lawyers, brokers, estate agents, bankers, IT
managers, academics, researchers, secretaries, administrators,
marketing managers, conference organizers, and public relations
specialists. They worked in a variety of settings from multinational
corporations to personally owned small businesses. We asked them
what communication tools they used, to explain how they used these
tools, to describe the main problems with these tools, and to identify
strategies they used to cope with the problems. The main tools used
were email, voicemail, IM, fax, phone, and written documents. We
observed the informants using their tools, also focusing on their use
of communication support tools (such as address books, PDAs, and
post-it notes) to manage contact information.
We first describe the nature and value of contact information and the
ad hoc set of tools used to manage it. We then elaborate: (a) the
problems people experience in deciding whom to maintain contact
information about; and (b) the onerous nature of data entry for the
large number of contacts that most people possess. Finally we
document the criteria people use to decide which of this huge set of
contacts to keep track of.

2. The Value of Contact Information

We observed a wide variety of tools being used to store and retrieve


contact information. They included: dedicated tools such as personal
address books (both digital and physical); corporate directories;
organization charts; “tool-specific” address books in email and speed-
dial lists for phones; business cards – either in rolodexes or kept
loose; ‘hotlists’ – small sets of frequently called numbers placed in
salient locations; pieces of paper on refrigerator doors, post-it notes,
notes on calendars. A first question we put to informants was why
they thought it was so important to maintain their own personal
contact information, when much of the information they stored was
publicly available. This is particularly true for employees of large
corporations, who have access to corporate directories and
organization charts. Three features of current business practice led
people to keep personal contact information: (1) Informants often
worked with partners or clients from other organizations, and they did
not have access to corporate directories for these people; (2) They
often needed access to contact information while on the move. It is
much easier to take one’s contact information along in a PDA or
filofax than to access a corporate database from a hotel room or
client’s office; (3) Corporate databases do not contain the esoteric,
personal information needed to maintain a relationship with a contact
(birthdays, universities, sports team allegiances, number of children,
and so on). Informants were unanimous about the value of their
contact information. This was evident not only from their comments,
but also from the time they invested in creating and maintaining
contact archives. As one informant, Mary, a freelance researcher,
pointed out, her personal contact list was a resource that pervaded all
of her work.

2.1 Problems: Contact Selection, Data Entry, Tool Diversity


However, contact management has a number of associated
difficulties. At first glance, the main problem informants had was the
number of contacts they needed to manage. We estimate that this
number varied from a low of several hundred to well into the
thousands, although reliable estimation was hard given the large
number of contact management tools people typically used, and the
fact that there was often duplication between these. Upon further
examination, though, deeper problems concerned: (a) the need to
make an explicit decision that someone was a valuable contact; (b)
the diversity of tools used; and (c) data entry.

2.2 Contact Selection. When someone calls you on the phone, leaves
you voicemail, sends you email, or hands you a business card, what
do you do? Do you record their contact information or not? The
difficulty is that it is hard to anticipate whether, and to what extent,
you will need
to communicate with that person in the future. Whether someone is
an “important contact” only becomes clear over time. The ease of
electronic communication, especially the ability to broadcast
messages to large numbers of people at little cost, exacerbates this
problem: you may be cc’ed on messages, get email from various
distribution lists, or receive mass mailings. To be safe, our informants
often “over-saved” information, leading to huge rolodexes,
overflowing booklets of business cards, and faded post-it notes
scattered around their work areas. Despite this strategy, participants
were still exposed to many more contacts than they recorded
information about. One reason for this was the laborious nature of
recording contact information.

2.3 Data Entry. Informants made it clear that contact information is


costly to acquire and especially hard to maintain. They often wanted
to record various types of addressing information for a particular
contact: work, home, and mobile phone numbers, fax number, email
address, postal address, instant messaging alias, as well as the IM
system it was good for, and so on. And, as we mentioned earlier,
some people found it important to include detailed personal and
social information that was useful in maintaining an effective
relationship with that contact.

2.4 Diversity of Tools. All the informants used ad hoc combinations


of tools, with some people evolving highly complex and idiosyncratic
systems. For example, Mary, the freelance researcher, had over 1000
people in her email address book, a 60 page Word document
containing over 1200 people, over 400 people in her PDA, as well as
miscellaneous people in
Christmas card lists. Ollie, a corporate research scientist, kept 7
different address books, using 2 PDAs, Microsoft Outlook, and 4
independent email address books. He also wrote key work numbers
on his office blackboard. One reason why these complex systems
evolved was that
informants seldom ‘cleaned up’ their contact information. People
were loath to delete any contact information. This seemed to be
motivated both by the effort of data entry, along with the belief that
even little used contact information may be relevant at some future
time.

2.5 Criteria for Determining. Contact Importance Returning to the


basic decision people face – is this an important contact? – we sought
to find out how our informants dealt with this issue. Informants
responded with a surprising consensus. Since they could not make
this decision at first exposure, they relied largely on the history of
their prior interactions. Further individual factors, such as
communication style seemed to affect the number and type of
contacts selected. In our interviews, we probed informants to identify
specific aspects of interaction history and communication style that
were critical in determining important contacts. We asked people to
walk us through their contact management tools and explain why
particular contacts had been included.

3. COMPARISON OF FIELD AND LAB STUDIES

Our field data suggested a significant, but currently underresearched


problem, that of contact management. People are exposed to large
numbers of potential contacts, but the onerous nature of data entry
means that they end up being conservative about who they add to their
contact management systems. Despite this, people have a large number
of contacts that they have to manage, but end up using a variety of ad
hoc tools for this purpose. Our experimental results confirm the
interview data in two important respects. First, consistent with the
interview data, people are exposed to a large number of contacts (859
on average), only 19% of whom they judge as important. This supports
the idea that people are exposed to many more contacts than they want
to keep in touch with. This in turn suggests that contact selection is an
important process. Second, the experiment confirmed the criteria that
our interviewees suggested for identifying important contacts. We
found evidence that a contact’s communication history, and
communication style were important determinants of whether a contact
was selected. Frequency, reciprocity, longevity, and recency predicted
subjective importance, as did contact affiliation and the style of the
user’s communication.

4. DESIGN AND THEORY IMPLICATIONS

Several design suggestions follow from these results. First, our


regression analysis is a model for identifying important contacts in
email, and this could be implemented directly as an algorithm. The
ability to automatically identify important contacts from
communication archives might be used in a number of applications,
allowing us to improve messaging applications, support reminding and
provide social recommendation. Messaging applications are currently
poorly integrated with contact management tools, but future systems
could exploit information about important contacts in a variety of ways.
These might include alerting, filtering and prioritization of incoming
email or voicemail messages based on the sender’s importance. Tighter
integration of contact information with messaging logs could be also
used to manage relationships with contacts, e.g. reminding the user
when they haven’t talked to an important contact in a long time. We
have implemented contact-based alerting and reminding in a social
network based user interface to communication and information.
Finally social recommendation systems might be able to exploit
information about a register of important contacts to either direct a user
query or guide information access. Other design implications concern
contact management tools directly. We could improve address book
utility by using our algorithm to automatically recommend that a
potentially important contact should be added to the address book,
based on their communication history. But even if we provide ways to
better identify significant contacts, data entry is still a major problem.
One possible way to address this would be to identify contact
information from other sources, such as Internet home pages containing
addresses. We may also be able to mine other types of records such as
phone and voicemail logs, or use reverse lookup to provide detailed
addresses for contacts. Having general techniques for populating
address books is clearly important. One unexpected finding from our
research was that 72% of important contacts came from outside the
user’s organization. While this may depend on the specific user
population, it suggests that corporate address books or intranets have
limited utility as a way to provide detailed addresses for contacts.

5. HARDWARE AND SOFTWARE REQUIREMENTS

Hardware Specification

Processor : Intel Pentium iv


Processor Speed : 1GHz to 2GHz
RAM : 512MB to 1GB
Hard Disk : 4GB to 30GB
Keyboard : 104 keys

Software Specification.

Language : Microsoft Visual Basic


Database : Microsoft Access
Operating System : Windows XP / Vista
6. Source code
6.1 Main file :-
#include<stdio.h>

#include<conio.h>

#include<string.h>

#include<stdlib.h>

#include"data.h"

#include"search.h"

void main()

void add_contact();

void delete_contact();

void list_contacts();

void edit_contact();

void search_contact();

void change_password();

char pass[30],ch,original[30],choice;

int i;

FILE *fp;

window(1,1,80,25);

textbackground(YELLOW);

clrscr();
window(20,10,60,15);

textbackground(BLACK);

clrscr();

gotoxy(4,3);

textcolor(RED+BLINK);

cprintf("Enter the Password : ");

i=0;

while(1)

ch=getch();

if(ch==13) //ASCII code ENTER key

{ pass[i]='\0';

break;

pass[i++]=ch;

printf("*");

//printf("\n You Entered %s",pass);

//Reading data from the file

fp=fopen("key.dat","r");

fgets(original,30,fp);

fclose(fp);

if(!strcmp(original,pass)==0)
{

gotoxy(4,3);

textcolor(WHITE+BLINK);

cprintf("\nIncorrect Password , Press any key...");

getch();

exit(0);

else

window(1,1,80,25);

textbackground(11);

clrscr();

gotoxy(32,3);

textcolor(RED);

cprintf("CONTACT MANAGER");

gotoxy(33,6);

textcolor(BLUE);

cprintf("Verson : 1.0 ");

gotoxy(18,9);

textcolor(181);

cprintf("Developed by : Ayanava , Sougata & Subrata");

gotoxy(5,15);
textcolor(BLUE);

cprintf("Please Wait :- ");

for(i=1;i<=50;i++)

cprintf("%c",219);

delay(200);

while(1)

textbackground(YELLOW);

clrscr();

window(18,5,60,22);

textbackground(BLACK);

clrscr();

textcolor(11);

gotoxy(18,2);

cprintf("MAIN MENU");

gotoxy(16,3);

cprintf("-------------");

textcolor(WHITE);

gotoxy(12,5);

cprintf("1. Add New Contact");

gotoxy(12,6);
cprintf("2. Delete Contact");

gotoxy(12,7);

cprintf("3. Edit Contact");

gotoxy(12,8);

cprintf("4. Search Contact");

gotoxy(12,9);

cprintf("5. Contact List");

gotoxy(12,10);

cprintf("6. Change Password");

gotoxy(12,11);

cprintf("7. Exit");

gotoxy(5,12);

cprintf("---------------------------------");

gotoxy(12,14);

textcolor(YELLOW+BLINK);

cprintf("Enter Your Choice ? ");

choice = getche();

switch(choice)

case '1':

add_contact();

break;
case '2':

delete_contact();

break;

case '3':

edit_contact();

break;

case '4':

search_contact();

break;

case '5':

list_contacts();

break;

case '6':

change_password();

break;

case '7':

exit(0);

getch();

}
int getsno()

FILE*fp;

int n,size;

fp=fopen("info.dat","rb");

size=sizeof(cont);

fseek(fp,-size,SEEK_END);

fread(&cont,sizeof(cont),1,fp);

n=cont.sno;

fclose(fp);

n++;

return(n);

void add_contact()

FILE *fp;

window(1,1,80,25);

textbackground(233);

textcolor(26);

clrscr();

printf("Add New Contact \n");

printf("-----------------------------------------------------------------");

fflush(stdin);
cont.sno=getsno();

printf("\nSerial No : %d",cont.sno);

fflush(stdin); //To clear input buffer

printf("\nEnter Category(Home/Friend/Work/Salesman/Student) :");

gets(cont.category);

fflush(stdin);

printf("Enter Name : ");

gets(cont.name);

fflush(stdin);

printf("Enter Gender M/F : ");

scanf("%c",&cont.gender);

fflush(stdin);

printf("Enter Age :");

scanf("%d",&cont.age);

fflush(stdin);

printf("Enter Address : ");

gets(cont.address);

fflush(stdin);

printf("Enter Phone No : ");

gets(cont.number);

fflush(stdin);

fp=fopen("info.dat","ab");

fwrite(&cont,sizeof(cont),1,fp);
fclose(fp);

textcolor(WHITE+BLINK);

cprintf("\n Successfully Saved , Press any Key ...");

getch();

void delete_contact()

char choice;

int n,found;

FILE *fp1,*fp2;

window(1,1,80,25);

textbackground(BLACK);

textcolor(YELLOW);

clrscr();

printf("Delete Contact");

printf("\n----------------------------------------------------------------");

printf("\nEnter Serial no to be Deleted :");

scanf("%d",&n);

fp1=fopen("info.dat","rb");

found=0;

while(fread(&cont,sizeof(cont),1,fp1)!=NULL)

if(cont.sno==n)
{

printf("\nCategory :
%s",cont.category);

printf("\nName :
%s",cont.name);

printf("\nGender :
%c",cont.gender);

printf("\nAge :
%d",cont.age);

printf("\nAddress :
%s",cont.address);

printf("\nContact No :
%s",cont.number);

printf("\n------------------------
--------------------------------------");

found=1;

break;

if(found==0)

textcolor(RED+BLINK);

printf("\n");

cprintf("Not Found , Press any Key...");

fclose(fp1);

return;
}

printf("\nDelete It Y/N :");

choice=getche();

if(choice=='Y' || choice=='y')

rewind(fp1);

fp2=fopen("temp.dat","wb");

while(fread(&cont,sizeof(cont),1,fp1)!=NULL)

if(cont.sno!=n)

fwrite(&cont,sizeof(cont),1,fp2);

fclose(fp1);

fclose(fp2);

remove("info.dat");

rename("temp.dat","info.dat");

textcolor(GREEN+BLINK);

printf("\n");

cprintf("Successfully Deleted,Press any Key.....");

getch();

}
void edit_contact()

FILE *fp;

int n,pos,found;

window(1,1,80,25);

textcolor(YELLOW);

textbackground(BLACK);

clrscr();

printf("Edit Contact");

printf("\n---------------------------------------------------------------");

printf("\nEnter the Serial No to be Edit :");

scanf("%d",&n);

fp=fopen("info.dat","r+b");

found=0;

while(fread(&cont,sizeof(cont),1,fp)!=NULL)

if(cont.sno==n)

found=1;

printf("\nCategory :
%s",cont.category);

printf("\nName :
%s",cont.name);
printf("\nGender :
%c",cont.gender);

printf("\nAddress :
%s",cont.address);

printf("\nAge :
%d",cont.age);

printf("\nContact No :
%s",cont.number);

break;

if(found==0)

printf("\n");

textcolor(RED+BLINK);

cprintf("Not Found , Press any Key...");

fclose(fp);

getch();

return;

printf("\nEnter New Data :\n");

pos=ftell(fp);

fseek(fp,pos-sizeof(cont),SEEK_SET);

fflush(stdin); //To clear input buffer

printf("\nEnter Category(Home/Friend/Work/Salesman/Student) :");


gets(cont.category);

fflush(stdin);

printf("Enter Name : ");

gets(cont.name);

fflush(stdin);

printf("Enter Gender M/F : ");

scanf("%c",&cont.gender);

fflush(stdin);

printf("Enter Age :");

scanf("%d",&cont.age);

fflush(stdin);

printf("Enter Address : ");

gets(cont.address);

fflush(stdin);

printf("Enter Phone No : ");

gets(cont.number);

fflush(stdin);

fwrite(&cont,sizeof(cont),1,fp);

fclose(fp);

printf("\n");

textcolor(GREEN+BLINK);

cprintf("Successfully Update , Press any Key...");

getch();
}

void search_contact()

char ch;

window(1,1,80,25);

textbackground(BLACK);

textcolor(11);

clrscr();

textcolor(GREEN);

cprintf("SEARCH OPTIONS");

printf("\n");

printf("------------------------------------------------------------------");

printf("\n1 Search by Serial No ");

printf("\n2 Search by Category ");

printf("\n3 Search by Name ");

printf("\n4 Search by Phone No ");

printf("\n-----------------------------------------------------");

textcolor(YELLOW+BLINK);

printf("\n");

cprintf("\nEnter Your Choice ? ");

ch=getche();

switch(ch)

{
case '1':

search_sno();

break;

case '2':

search_category();

break;

case '3':

search_name();

break;

case '4':

search_phone();

break;

case '5':

return;

void list_contacts()

FILE *fp;

int i;

window(1,1,80,25);

textbackground(BLACK);
textcolor(51);

clrscr();

gotoxy(34,1);

printf("--LIST OF CONTACTS--");

printf("\n");

for(i=1;i<=80;i++)

printf("-");

gotoxy(1,3);

printf("S.NO");

gotoxy(8,3);

printf("CATEGORY");

gotoxy(20,3);

printf("NAME");

gotoxy(30,3);

printf("GENDER");

gotoxy(40,3);

printf("AGE");

gotoxy(47,3);

printf("ADDRESS");

gotoxy(60,3);

printf("PHONE NO");

printf("\n");

for(i=1;i<=80;i++)
printf("-");

fp=fopen("info.dat","rb");

i=5;

while(fread(&cont,sizeof(cont),1,fp)!=NULL)

gotoxy(1,i);

printf("%d",cont.sno);

gotoxy(8,i);

printf("%s",cont.category);

gotoxy(19,i);

printf("%s",cont.name);

gotoxy(32,i);

printf("%c",cont.gender);

gotoxy(41,i);

printf("%d",cont.age);

gotoxy(47,i);

printf("%s",cont.address);

gotoxy(60,i);

printf("%s",cont.number);

i++;

fclose(fp);

textcolor(RED+BLINK);
printf("\n");

cprintf("Press any Key...");

getch();

void change_password()

FILE *fp;

char current[30],original[30],newpass[30],confirm[30];

window(1,1,80,25);

textbackground(WHITE);

textcolor(BLACK);

clrscr();

printf("Change Password");

printf("\n----------------------------------------------------------------");

printf("\nEnter the Current Password :");

gets(current);

fp=fopen("key.dat","r");

fgets(original,30,fp);

fclose(fp);

if(strcmp(current,original)!=0)

textcolor(RED);
cprintf("\nIncorrect Password
, Press any Key...");

getch();

return;

printf("\nEnter New Password :");

gets(newpass);

printf("\nRe-Enter Password :");

gets(confirm);

if(strcmp(confirm,newpass)!=0)

printf("\nNot Match , Press any Key..." );

getch();

return;

fp=fopen("key.dat","w");

fprintf(fp,"%s",newpass);

textcolor(GREEN);

cprintf("\nSuccessfully Updated , Press any Key...");

getch();

}
6.2 Search.h file :-

void search_sno()
{
FILE *fp;
int n,found;
textcolor(YELLOW);
clrscr();
printf("Enter the Serial No :");
scanf("%d",&n);
fp=fopen("info.dat","r");
found=0;
while(fread(&cont,sizeof(cont),1,fp)!=NULL)
{
if(cont.sno==n)
{
printf("\nCategory :
%s",cont.category);
printf("\nName : %s",cont.name);
printf("\nGender : %c",cont.gender);
printf("\nAge : %d",cont.age);
printf("\nAddress : %s",cont.address);
textcolor(GREEN);
cprintf("\nSuccessfully Search , Press any
Key...");
found=1;
break;
}
}

if(found==0)
{
printf("\nNot Found , Press any Key...");
getch();
return;
}

getch();
}
void search_category()
{
char cat[20];
FILE *fp;
int i;
window(1,1,80,25);
textbackground(WHITE);
textcolor(BLACK);
clrscr();
printf("Enter Category :");
gets(cat);
gotoxy(34,1);
printf("\n");
for(i=1;i<=80;i++)
printf("-");
gotoxy(1,3);
printf("S.NO");
gotoxy(8,3);
printf("CATEGORY");
gotoxy(20,3);
printf("NAME");
gotoxy(30,3);
printf("GENDER");
gotoxy(40,3);
printf("AGE");
gotoxy(47,3);
printf("ADDRESS");
gotoxy(60,3);
printf("PHONE NO");
printf("\n");
for(i=1;i<=80;i++)
printf("-");
fp=fopen("info.dat","rb");
i=5;
while(fread(&cont,sizeof(cont),1,fp)!=NULL)
{
if(strcmpi(cat,cont.category)==0)
{
gotoxy(1,i);
printf("%d",cont.sno);
gotoxy(8,i);
printf("%s",cont.category);
gotoxy(19,i);
printf("%s",cont.name);
gotoxy(32,i);
printf("%c",cont.gender);
gotoxy(41,i);
printf("%d",cont.age);
gotoxy(47,i);
printf("%s",cont.address);
gotoxy(60,i);
printf("%s",cont.number);
i++;
}
}
fclose(fp);
textcolor(RED+BLINK);
printf("\n");
cprintf("Press any Key...");
getch();
}
void search_name()
{
char nam[20];
FILE *fp;
int i;
window(1,1,80,25);
textbackground(WHITE);
textcolor(BLACK);
clrscr();
printf("Enter Name :");
gets(nam);
gotoxy(34,1);
printf("\n");
for(i=1;i<=80;i++)
printf("-");
gotoxy(1,3);
printf("S.NO");
gotoxy(8,3);
printf("CATEGORY");
gotoxy(20,3);
printf("NAME");
gotoxy(30,3);
printf("GENDER");
gotoxy(40,3);
printf("AGE");
gotoxy(47,3);
printf("ADDRESS");
gotoxy(60,3);
printf("PHONE NO");
printf("\n");
for(i=1;i<=80;i++)
printf("-");
fp=fopen("info.dat","rb");
i=5;
while(fread(&cont,sizeof(cont),1,fp)!=NULL)
{
if(strcmpi(nam,cont.name)==0)
{
gotoxy(1,i);
printf("%d",cont.sno);
gotoxy(8,i);
printf("%s",cont.category);
gotoxy(19,i);
printf("%s",cont.name);
gotoxy(32,i);
printf("%c",cont.gender);
gotoxy(41,i);
printf("%d",cont.age);
gotoxy(47,i);
printf("%s",cont.address);
gotoxy(60,i);
printf("%s",cont.number);
i++;
}
}
fclose(fp);
textcolor(RED+BLINK);
printf("\n");
cprintf("Press any Key...");
getch();
}
void search_phone()
{
char ph[15];
FILE *fp;
int i;
window(1,1,80,25);
textbackground(WHITE);
textcolor(BLACK);
clrscr();
printf("Enter Number:");
gets(ph);
gotoxy(34,1);
printf("\n");
for(i=1;i<=80;i++)
printf("-");
gotoxy(1,3);
printf("S.NO");
gotoxy(8,3);
printf("CATEGORY");
gotoxy(20,3);
printf("NAME");
gotoxy(30,3);
printf("GENDER");
gotoxy(40,3);
printf("AGE");
gotoxy(47,3);
printf("ADDRESS");
gotoxy(60,3);
printf("PHONE NO");
printf("\n");
for(i=1;i<=80;i++)
printf("-");
fp=fopen("info.dat","rb");
i=5;
while(fread(&cont,sizeof(cont),1,fp)!=NULL)
{
if(strcmp(ph,cont.number)==0)
{
gotoxy(1,i);
printf("%d",cont.sno);
gotoxy(8,i);
printf("%s",cont.category);
gotoxy(19,i);
printf("%s",cont.name);
gotoxy(32,i);
printf("%c",cont.gender);
gotoxy(41,i);
printf("%d",cont.age);
gotoxy(47,i);
printf("%s",cont.address);
gotoxy(60,i);
printf("%s",cont.number);
i++;
}
}
fclose(fp);
textcolor(RED+BLINK);
printf("\n");
cprintf("Press any Key...");
getch();
}
6.3 Data.h file :-

struct contact
{
int sno;
char category[20];
char name[20];
char gender;
int age;
char address[50];
char number[10];
}cont;

7. Result :-

Enter the password screen :-


Loading Screen :-

Main Menu :-
Add New Contact Screen :-

Delete Contact Screen :-


Edit Contact Screen :-

Search Contact Screen :-


Successful Search Screen :-

Saved Contact List Screen :-


Change Password Screen :-

You might also like