SlideShare a Scribd company logo
1 of 33
TERM PAPER 
Of 
fOUNDATION Of COMPUTING 
TOPIC: - TELEPHONE DIRECTORY 
SUbMITTED TO: - SUbMITTED bY:- 
MS. SUkHDILPREET kAUR ASHUTOSH kUMAR 
ROLL NO.:- R246b47 
REGD. NO:- 10801374 
1
ACkNOWLEDGEMENT 
It is not until you undertake the project like this one that you realize 
how massive the effort it really is, or how much you must rely upon 
the Selfless efforts and goodwill of others. There are many who 
helped us with this project, and we want to thank them all from the 
core of our Hearts. 
We owe special words of thanks to our Teachers 
MS.SUKHDILPREET KAUR for their vision, thoughtful 
counseling and encouragement at every step of the project. We are 
also thankful to the teachers of the Department for giving us the best 
of knowledge and guidance throughout the project. 
And last but not the least, we find no words to acknowledge the 
financial assistance & moral support rendered by our parents in 
making the effort a success. All this has become reality because of 
their blessings and above all by the grace of god. 
ASHUTOSH KUMAR 
ROLL NO:-R246B47 
REGD.ID:-10801374 
2
TAbLE Of CONTENTS 
S.No Content Page no. 
1 Introduction 4 
2 System Requirement 8 
3 System Description 9 
4 System Design 10 
5 Source code 11 
6 Output 29 
7 Testing 32 
8 Future scope 33 
3
INTRODUCTION: 
We have discussed so far various features of C language and are 
ready to write and execute program of modest complexity. However, 
before attempting to develop complex programs, it is worthwhile to 
consider some programming techniques that would help design 
efficient and error free. 
The program development process includes three important stages, 
namely, program design, program coding and program testing. All the 
three stages contribute to the production of high quality program. 
In “TELEPHONE DIRECTORY” we have done system design, 
source coding, and program testing and added many more features to 
facilitate the user with the best. We have given the user the facility to 
enter the person’s record and providing the option to save and delete 
that record and many more options. 
We can improve the efficiency of the system, thus overcome the 
drawbacks of the existing system. 
· Less human error 
· Strength and strain of manual labour can be reduced 
· High security 
· Data consistency 
· Easy to handle 
· Easy data updating 
· Easy record keeping 
· Backup data can be easily genera 
4
OVERVIEW TO C 
HISTORY Of C: 
C is a popular general purpose programming language. It is one 
of the most popular computer languages today, because it is a 
structured, high level, machine independent language. 
The root of all modern language is ALGOL, introduced in early 
1960’s. ALGOL was the 1st computer language to use a block 
structure. Subsequently, several other languages were announced after 
1960’s. In 1967, Martin Richard developed a language called BCPL 
i.e. basic combined programming language mainly for writing system 
software. In 1970, Ken Thompson created a language using many 
features of BCPL and called it simply B. B was used to create early 
version of UNIX operating system. 
C was evolved from ALGOL, BCPL, and B by Dennis Ritchie at the 
Bell Laboratories in 1972, strongly associated with UNIX. During 
1970’s, C had evolved into the “TRADITIONAL C”. With the 
publication of the book ‘The C Programming language’ by Brian 
Kerningham and Dennis Ritchie in 1978, it becomes more powerful. 
In 1983, American National Standards Institutes (ANSI) appointed a 
technical committee to define a standard for C. The committee 
approved a version of C in December 1989, which is now known as 
ANSI C. It was then approved by International Standard Organization 
(ISO) in 1990. 
5
IMPORTANCE Of C: 
The increasing popularity of C is probably due to its many 
desirable qualities. The C compiler combines the capabilities of an 
assembly language with the features of a high level language and 
therefore it is well suited for writing both system software and 
business packages. In fact many of the C compilers available in the 
market are written in C. Programs written in C are efficient and fast. 
This is due to its variety of data types and powerful operators. It is 
many times faster than BASIC. 
There are only 32 key words in ANSI C and its strength lies in its 
built in functions. C is highly portable; this means that C programs 
written for one computer can be run on another with little or no 
modifications. C language is well suited for structured programming, 
thus requiring the user to think of a problem in terms of function 
modules or blocks. This modular structure makes program de-bugging, 
testing and maintenance easier.Another important feature of 
C is its ability to extend itself. We can continuously add our own 
functions to C library, thus our programming task becomes so easier 
and simple. 
6
INTRODUCTION Of TELEPHONE 
DIRECTORY 
We can make this TELEPHONE DIRECTORY in C language by using three 
or more than three header files or many data types such as: 
1. #include<stdio.h> : this header file will contain Scanf() , Printf () And, 
there are many header files which are used in this program…. 
2. #include<conio.h>: this header file will contain Clrscr(); , Getch(); , and 
many more….. 
3 . #include<string.h> : this header file will contain string function 
such as 1.Strrev(); 
2. Strlen(); 
3. Strupr(); 
4. Strlwr(); 
5. And many mores…… 
7
SYSTEM REQUIREMENTS 
Operating System: Windows 2000/NT/Xp/Vista 
RAM: 256 MB or more 
HARD DISK 40 GB or more 
Processor P3 or High 
Compiler Standard C++ Compiler 
8
SYSTEM DESCRIPTION 
THE OPERATING SYSTEM USED IN THIS PROJECT IS 
WINDOWSXPIT HAS MICROSOFT OFFICE INSTALLED IN IT. 
IT HAS RAM OF 2GB. HARD DISK CAPACITY OF OPERATING 
SYSTEM IS 250GB. IT CONSISTS OF PENTIUM-4 
PROCESSOR.THE OPEREATING SYSTEM ALSO HAS C++ 
COMPILER. THE SYSTEM ALSO HAS TYPE CONVERSIONS 
WHICH CONVERT LOWER TO UPPER TYPE. THE 
OPERATING SYSTEM HAVE 1GB RAM FOR MICROSOFT 
WORLD. 
9
system design: 
SAVE ENTRY 
IF YES IF NO 
10 
START 
WELCOME TO THE MAIN 
MENU 
ENTER YOUR 
CHOICE 
NEW ENTRY 
DISPLAY AN 
ENTRY 
DELETE AN 
ENTRY 
DISPLAY ALL 
ENTRIES 
EMPTY THE 
BOOK 
LOAD 
ENTRIES 
DELETE ALL 
FILES 
END 
STOP 
IF U WANT 
TO 
CONTINUE
sOURCe COde 
#include<stdio.h> 
#include<stdlib.h> 
#include<conio.h> 
#include<alloc.h> 
#include<string.h> 
#include<graphics.h> 
struct entry 
{ 
char name[50]; 
char nick[50]; 
char email[50]; 
char address[50]; 
char city[50]; 
char cont[50]; 
char pin[50]; 
struct entry *lptr; 
struct entry *rptr; 
}*temp,*newe,*l,*r; 
typedef struct entry *list; 
11
void newentry(); 
void display(char n[50]); 
void deletentry(char n[50]); 
void displayall(); 
void makempty(); 
int isempty(); 
void saventry(); 
void loadentry(); 
void deleteall(); 
void newentry() 
{ 
char a[50],b[50],f[50],g[50],c[50],d[50],e[50]; 
int i,k=0; 
printf("Enter the Datas for the New Entry:"); 
printf("Name :"); 
scanf("%s",a); 
printf("Nick name :"); 
scanf("%s",b); 
printf("E-mail ID :"); 
scanf("%s",c); 
printf("Address :"); 
scanf("%s",d); 
printf("City :"); 
12
scanf("%s",e); 
printf("Contact No:"); 
scanf("%s",f); 
printf("Pincode :"); 
scanf("%s",g); 
newe=(struct entry*)malloc(sizeof(struct entry)); 
for(i=0;i<50;i++) 
{ 
newe->name[i]=' '; 
newe->nick[i]=' '; 
newe->email[i]=' '; 
newe->address[i]=' '; 
newe->city[i]=' '; 
newe->cont[i]=' '; 
newe->pin[i]=' '; 
} 
for(i=0;i<50;i++) 
{ 
newe->name[i]=a[i]; 
newe->nick[i]=b[i]; 
newe->email[i]=c[i]; 
newe->address[i]=d[i]; 
newe->city[i]=e[i]; 
13
newe->cont[i]=f[i]; 
newe->pin[i]=g[i]; 
} 
if(isempty()) 
{ 
newe->lptr=newe->rptr=NULL; 
l=r=newe; 
printf("Your Entry is Added"); 
} 
else 
{ 
temp=l; 
while(temp!=NULL) 
{ 
i=stricmp(newe->name,temp->name); 
if(i<0) 
break; 
else if(i>0) 
temp=temp->rptr; 
else if(i==0) 
{ 
printf("Name Already Exists.Entry cannot be Added"); 
k=1; 
14
break; 
} 
} 
if(k!=1) 
{ 
if(temp==l) 
{ 
newe->lptr=NULL; 
newe->rptr=l; 
l->lptr=newe; 
l=newe; 
printf("Your Entry is Added"); 
} 
else if(temp==NULL) 
{ 
newe->rptr=NULL; 
newe->lptr=r; 
r->rptr=newe; 
r=newe; 
printf("Your Entry is Added"); 
} 
else 
{ 
15
newe->rptr=temp; 
newe->lptr=temp->lptr; 
temp->lptr=newe; 
(newe->lptr)->rptr=newe; 
printf("Your Entry is Added"); 
} 
} 
} 
} 
void displayall() 
{ int n=1; 
if(!isempty()) 
{ 
temp=l; 
while(temp!=NULL) 
{ 
printf("[%d] Name :%s Nick Name :%s E-mail ID :%s address :%s 
City :%s Contact.No:%s Pin code :%s",n,temp->name,temp->nick,temp- 
>email,temp->address,temp->city,temp->cont,temp->pin); 
temp=temp->rptr; 
n++; 
} 
16
} 
else 
printf("Address Book is Empty"); 
} 
void deletentry(char n[50]) 
{ 
int i; 
if(isempty()) 
printf("Address Book is Empty"); 
else{ 
temp=l; 
while(temp!=NULL) 
{ 
i=stricmp(temp->name,n); 
if(i==NULL) 
{ 
if(l==r) 
{ 
l=r=NULL; 
printf("Entry deleted"); 
break; 
} 
17
else if(temp==l) 
{ 
l=l->rptr; 
l->lptr=NULL; 
printf("Entry deleted"); 
break; 
} 
else if(temp==r) 
{ 
r=r->lptr; 
r->rptr=NULL; 
printf("Entry deleted"); 
break; 
} 
else{ 
(temp->lptr)->rptr=temp->rptr; 
(temp->rptr)->lptr=temp->lptr; 
printf("Entry deleted"); 
break; 
} 
} 
temp=temp->rptr; 
18
} 
if(temp==NULL) 
printf("Not Found"); 
} 
} 
int isempty() 
{ 
return l==NULL; 
} 
void makempty() 
{ 
l=r=NULL; 
printf("Address Book is Emptied"); 
} 
void display(char n[50]) 
{ 
int i,p=1; 
19
if(isempty()) 
printf("Address Book is Empty"); 
else 
{ 
temp=l; 
while(temp!=NULL) 
{ 
i=stricmp(temp->name,n); 
if(i==NULL) 
{if(p==1) 
printf("Entry is found in %dst position",p); 
else if(p==2) 
printf("Entry is found in %dnd position",p); 
else if (p==3) 
printf("Entry is found in %drd position",p); 
else 
printf("Entry is found in %dth position",p); 
printf("Name :%s Nick Name :%s E-mail ID :%s address :%s City : 
%s Contact.No:%s Pin code :%s ",temp->name,temp->nick,temp- 
>email,temp->address,temp->city,temp->cont,temp->pin); 
break; 
} 
temp=temp->rptr; 
20
p++; 
} 
if(temp==NULL) 
printf("Entry Not Found"); 
} 
} 
void main() 
{ 
int l=1,m; 
int gd=DETECT,gm; 
char n[50]; 
initgraph(&gd,&gm,"c:tcbgi"); 
while(l!=8) 
{ 
clrscr(); 
textmode(C80); 
textcolor(4); 
cprintf("********************************************************* 
***********************#------------------------MINI PROJECT-TELEPHONE 
DIRECTORY 
--------------------#*************************************************** 
*****************************"); 
cprintf("Enter Your Choice"); 
21
printf(" "); 
cprintf("(1)-New Entry"); 
printf(" "); 
cprintf("(2)-Display an Entry"); 
printf(" "); 
cprintf("(3)-Delete an Entry"); 
printf(" "); 
cprintf("(4)-Display all Entries"); 
printf(" "); 
cprintf("(5)-Empty the book"); 
printf(" "); 
cprintf("(6)-Save Entry"); 
printf(" "); 
cprintf("(7)-Load Entries"); 
printf(" "); 
cprintf("(8)-Delete All Saved Files"); 
printf(" "); 
cprintf("(9)-End"); 
printf(" "); 
cprintf("********************************************************* 
***********************"); 
printf(" "); 
scanf("%d",&l); 
22
switch(l) 
{ 
case 1: 
textcolor(2); 
newentry(); 
getch(); 
break; 
case 2: 
textcolor(2); 
cprintf("Enter the Name of the Person to Display"); 
printf(" "); 
scanf("%s",&n); 
display(n); 
getch(); 
break; 
case 3: 
textcolor(2); 
cprintf("Enter the Name of the Person to Delete"); 
printf(" "); 
scanf("%s",&n); 
deletentry(n); 
getch(); 
break; 
23
case 4: 
textcolor(2); 
displayall(); 
getch(); 
break; 
case 5: 
textcolor(2); 
makempty(); 
getch(); 
break; 
case 6: 
textcolor(2); 
saventry(); 
getch(); 
break; 
case 7: 
textcolor(2); 
loadentry(); 
getch(); 
break; 
case 8: 
textcolor(2); 
deleteall(); 
24
getch(); 
break; 
case 9: 
textcolor(2); 
printf("Program Ends Here.Thank You!!!"); 
printf(" "); 
getch(); 
break; 
default: 
textcolor(2); 
printf("Enter a Valid Choice from 1-9 only"); 
printf(" "); 
getch(); 
break; 
} 
} 
getch(); 
} 
void saventry() 
{ 
char n[50]; 
int c; 
list t; 
25
int i;t=l; 
printf("Enter the Name of the Person"); 
scanf("%s",n); 
if(isempty()) 
printf("Address Book is Empty"); 
else 
{ 
FILE *f; 
f=fopen("entry.c","a"); 
while(t!=NULL) 
{ 
i=stricmp(t->name,n); 
if(i==0) 
{ 
fprintf(f,"%s %s %s %s %s %s %s",t->name,t->nick,t->email,t->address,t->city,t- 
>cont,t->pin); 
printf("Your Entry Saved"); 
printf("Add Another Entry? (1-yes/2-no)"); 
scanf("%d",&c); 
if(c==1) 
saventry(); 
else if(c==2) 
break; 
26
} 
t=t->rptr; 
} 
fclose(f); 
if(t==NULL) 
printf("Entry Not Found"); 
} 
} 
void loadentry() 
{ 
int i=1; 
list t; 
FILE *f; 
f=fopen("entry.c","r"); 
if(f==NULL) 
{ 
printf("Cannot Open"); 
exit(1); 
} 
while(fscanf(f," %s %s %s %s %s %s %s",t->name,t->nick,t->email,t- 
>address,t->city,t->cont,t->pin)!=EOF) 
{ printf("[%d] Name :%s Nick Name :%s E-mail ID :%s 
address :%s City :%s Contact.No:%s Pin code :%s",i,t->name,t- 
>nick,t->email,t->address,t->city,t->cont,t->pin); 
27
i++;} 
fclose(f); 
} 
void deleteall() 
{ 
FILE *f; 
f=fopen("entry.c","w"); 
fclose(f); 
printf("all saved files were delete"); 
} 
28
OUTPUT 
29
30
31
TESTING 
THE SOURCECODE DECLARED ABOVE FOR THE PROGRAM 
OF TELEPHONE DIRECTORY HAS BEEN TESTED AND IT 
HAS BEEN FOUND THAT THE ABOVE SOURCE CODE IS 
OKAY AND CORRECT.THE PROGRAM INVOLVES MANY 
TYPE OF CONVERSIONS. THESE CONVERSIONS HAS TO 
DONE CAREFULLY. 
MAINLY THERE ARE TWO TYPES OF TESTING: 
1-SYSTEM TESTING AND 
2-INTEGRATION TESTING 
SYSTEM TESTING INVOLVES WHOLE TESTING OF 
PROGRAM AT ONCE AND INTEGRATION TESTING 
INVOLVES THE BREAKING OF PROGRAM INTO MODULES & 
THEN TEST. 
32
FUTURE SCOPE 
In future one change can be done by adding the fingerprints of the 
persons of which the address is entered.And one more major change 
which can be done in this project is that to add the snaps of the person 
of which the address is entered.We can also add or subtract details of 
the individual. 
33

More Related Content

What's hot

Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Arslan Hussain
 
Token, Pattern and Lexeme
Token, Pattern and LexemeToken, Pattern and Lexeme
Token, Pattern and LexemeA. S. M. Shafi
 
Lab report for Prolog program in artificial intelligence.
Lab report for Prolog program in artificial intelligence.Lab report for Prolog program in artificial intelligence.
Lab report for Prolog program in artificial intelligence.Alamgir Hossain
 
Data base management system LAB MANUAL KCS 551.pdf
Data base management system LAB MANUAL KCS 551.pdfData base management system LAB MANUAL KCS 551.pdf
Data base management system LAB MANUAL KCS 551.pdfVandanaTripathi32
 
18CSL58 DBMS LAB Manual.pdf
18CSL58 DBMS LAB Manual.pdf18CSL58 DBMS LAB Manual.pdf
18CSL58 DBMS LAB Manual.pdfSyed Mustafa
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithmMohd Arif
 
Lecture 1 data structures and algorithms
Lecture 1 data structures and algorithmsLecture 1 data structures and algorithms
Lecture 1 data structures and algorithmsAakash deep Singhal
 
Access specifier
Access specifierAccess specifier
Access specifierzindadili
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and AlgorithmDhaval Kaneria
 
Introduction To Autumata Theory
 Introduction To Autumata Theory Introduction To Autumata Theory
Introduction To Autumata TheoryAbdul Rehman
 
Chapter 6 intermediate code generation
Chapter 6   intermediate code generationChapter 6   intermediate code generation
Chapter 6 intermediate code generationVipul Naik
 
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...Edureka!
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithmsJulie Iskander
 

What's hot (20)

Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1
 
Token, Pattern and Lexeme
Token, Pattern and LexemeToken, Pattern and Lexeme
Token, Pattern and Lexeme
 
Lab report for Prolog program in artificial intelligence.
Lab report for Prolog program in artificial intelligence.Lab report for Prolog program in artificial intelligence.
Lab report for Prolog program in artificial intelligence.
 
Data base management system LAB MANUAL KCS 551.pdf
Data base management system LAB MANUAL KCS 551.pdfData base management system LAB MANUAL KCS 551.pdf
Data base management system LAB MANUAL KCS 551.pdf
 
18CSL58 DBMS LAB Manual.pdf
18CSL58 DBMS LAB Manual.pdf18CSL58 DBMS LAB Manual.pdf
18CSL58 DBMS LAB Manual.pdf
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithm
 
[OOP - Lec 18] Static Data Member
[OOP - Lec 18] Static Data Member[OOP - Lec 18] Static Data Member
[OOP - Lec 18] Static Data Member
 
Lecture 1 data structures and algorithms
Lecture 1 data structures and algorithmsLecture 1 data structures and algorithms
Lecture 1 data structures and algorithms
 
Access specifier
Access specifierAccess specifier
Access specifier
 
Python programming : List and tuples
Python programming : List and tuplesPython programming : List and tuples
Python programming : List and tuples
 
Structure in C
Structure in CStructure in C
Structure in C
 
DATABASE MANAGEMENT SYSTEM LAB.pdf
DATABASE MANAGEMENT SYSTEM LAB.pdfDATABASE MANAGEMENT SYSTEM LAB.pdf
DATABASE MANAGEMENT SYSTEM LAB.pdf
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and Algorithm
 
Introduction To Autumata Theory
 Introduction To Autumata Theory Introduction To Autumata Theory
Introduction To Autumata Theory
 
Function Pointer
Function PointerFunction Pointer
Function Pointer
 
C Programming
C ProgrammingC Programming
C Programming
 
Chapter 6 intermediate code generation
Chapter 6   intermediate code generationChapter 6   intermediate code generation
Chapter 6 intermediate code generation
 
Shell programming
Shell programmingShell programming
Shell programming
 
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
Tkinter Python Tutorial | Python GUI Programming Using Tkinter Tutorial | Pyt...
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 

Viewers also liked

A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook applicationsvrohith 9
 
Phonebook Directory or Address Book In Android
Phonebook Directory or Address Book In AndroidPhonebook Directory or Address Book In Android
Phonebook Directory or Address Book In AndroidABHISHEK DINKAR
 
A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook applicationsvrohith 9
 
Phonebook
PhonebookPhonebook
Phonebookniluo7
 
Contact Management - Schmooze
Contact Management - SchmoozeContact Management - Schmooze
Contact Management - SchmoozeMathew Lawrence
 
Book store automation system
Book store automation systemBook store automation system
Book store automation systemUpendra Sengar
 
Contact Management
Contact ManagementContact Management
Contact Managementtamil999
 
Invoice generation system
Invoice generation systemInvoice generation system
Invoice generation systemSaugata Palit
 
University Management Information System
University Management Information SystemUniversity Management Information System
University Management Information SystemAbzetdin Adamov
 
Scientific calculator in c
Scientific calculator in cScientific calculator in c
Scientific calculator in cUpendra Sengar
 
University Management System
University Management SystemUniversity Management System
University Management SystemChanHan Hy
 
Library Management System PPT
Library Management System PPTLibrary Management System PPT
Library Management System PPTTamaghna Banerjee
 
My Project Report Documentation with Abstract & Snapshots
My Project Report Documentation with Abstract & SnapshotsMy Project Report Documentation with Abstract & Snapshots
My Project Report Documentation with Abstract & SnapshotsUsman Sait
 
Project Proposal document for Hotel Management System
Project Proposal document for Hotel Management SystemProject Proposal document for Hotel Management System
Project Proposal document for Hotel Management SystemCharitha Gamage
 

Viewers also liked (20)

A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook application
 
Phonebook Directory or Address Book In Android
Phonebook Directory or Address Book In AndroidPhonebook Directory or Address Book In Android
Phonebook Directory or Address Book In Android
 
A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook application
 
Phonebook
PhonebookPhonebook
Phonebook
 
Phonebook
PhonebookPhonebook
Phonebook
 
Md5project
Md5projectMd5project
Md5project
 
Contact Management - Schmooze
Contact Management - SchmoozeContact Management - Schmooze
Contact Management - Schmooze
 
Book store automation system
Book store automation systemBook store automation system
Book store automation system
 
Contact Management
Contact ManagementContact Management
Contact Management
 
Invoice generation system
Invoice generation systemInvoice generation system
Invoice generation system
 
Student record
Student recordStudent record
Student record
 
University Management Information System
University Management Information SystemUniversity Management Information System
University Management Information System
 
Scientific calculator in c
Scientific calculator in cScientific calculator in c
Scientific calculator in c
 
University Management System
University Management SystemUniversity Management System
University Management System
 
School Management (c++)
School Management (c++) School Management (c++)
School Management (c++)
 
Hotel Management System
Hotel Management SystemHotel Management System
Hotel Management System
 
SYNOPSIS WRITING
SYNOPSIS WRITINGSYNOPSIS WRITING
SYNOPSIS WRITING
 
Library Management System PPT
Library Management System PPTLibrary Management System PPT
Library Management System PPT
 
My Project Report Documentation with Abstract & Snapshots
My Project Report Documentation with Abstract & SnapshotsMy Project Report Documentation with Abstract & Snapshots
My Project Report Documentation with Abstract & Snapshots
 
Project Proposal document for Hotel Management System
Project Proposal document for Hotel Management SystemProject Proposal document for Hotel Management System
Project Proposal document for Hotel Management System
 

Similar to Telephone directory in c

computer science project for class 12 on telephone billing
computer science project for class 12 on telephone billingcomputer science project for class 12 on telephone billing
computer science project for class 12 on telephone billinganshi acharya
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingAkshay Ithape
 
C++ vs C#
C++ vs C#C++ vs C#
C++ vs C#sudipv
 
00 C hello world.pptx
00 C hello world.pptx00 C hello world.pptx
00 C hello world.pptxCarla227537
 
His162013 140529214456-phpapp01
His162013 140529214456-phpapp01His162013 140529214456-phpapp01
His162013 140529214456-phpapp01Getachew Ganfur
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++Ankur Pandey
 
C programming presentation(final)
C programming presentation(final)C programming presentation(final)
C programming presentation(final)aaravSingh41
 
object oriented programming language fundamentals
object oriented programming language fundamentalsobject oriented programming language fundamentals
object oriented programming language fundamentalsChaithraCSHirematt
 
C Programming language - introduction
C Programming  language - introduction  C Programming  language - introduction
C Programming language - introduction GopikaS12
 

Similar to Telephone directory in c (20)

Ums in c
Ums in cUms in c
Ums in c
 
computer science project for class 12 on telephone billing
computer science project for class 12 on telephone billingcomputer science project for class 12 on telephone billing
computer science project for class 12 on telephone billing
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
C_Programming_Notes_ICE
C_Programming_Notes_ICEC_Programming_Notes_ICE
C_Programming_Notes_ICE
 
Learn C Language
Learn C LanguageLearn C Language
Learn C Language
 
Introduction to c language
Introduction to c language Introduction to c language
Introduction to c language
 
C++ vs C#
C++ vs C#C++ vs C#
C++ vs C#
 
Session 1 - c++ intro
Session   1 - c++ introSession   1 - c++ intro
Session 1 - c++ intro
 
Abc c program
Abc c programAbc c program
Abc c program
 
C tutorials
C tutorialsC tutorials
C tutorials
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Programming in C
Programming in CProgramming in C
Programming in C
 
00 C hello world.pptx
00 C hello world.pptx00 C hello world.pptx
00 C hello world.pptx
 
C++ for hackers
C++ for hackersC++ for hackers
C++ for hackers
 
His162013 140529214456-phpapp01
His162013 140529214456-phpapp01His162013 140529214456-phpapp01
His162013 140529214456-phpapp01
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 
C programming presentation(final)
C programming presentation(final)C programming presentation(final)
C programming presentation(final)
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
object oriented programming language fundamentals
object oriented programming language fundamentalsobject oriented programming language fundamentals
object oriented programming language fundamentals
 
C Programming language - introduction
C Programming  language - introduction  C Programming  language - introduction
C Programming language - introduction
 

More from Upendra Sengar

Shipping and Storage: A New Approach
Shipping and Storage: A New ApproachShipping and Storage: A New Approach
Shipping and Storage: A New ApproachUpendra Sengar
 
Sales and inventory management project report
Sales and inventory management project reportSales and inventory management project report
Sales and inventory management project reportUpendra Sengar
 
Data flow diagram for order system
Data flow diagram for order systemData flow diagram for order system
Data flow diagram for order systemUpendra Sengar
 
Medical store management system
Medical store management systemMedical store management system
Medical store management systemUpendra Sengar
 
Ticket window & automation system
Ticket window & automation systemTicket window & automation system
Ticket window & automation systemUpendra Sengar
 
Term paper of cse(211) avdhesh sharma c1801 a24 regd 10802037
Term paper of cse(211) avdhesh sharma c1801 a24 regd 10802037Term paper of cse(211) avdhesh sharma c1801 a24 regd 10802037
Term paper of cse(211) avdhesh sharma c1801 a24 regd 10802037Upendra Sengar
 
Snake game implementation in c
Snake game implementation in cSnake game implementation in c
Snake game implementation in cUpendra Sengar
 

More from Upendra Sengar (14)

Shipping and Storage: A New Approach
Shipping and Storage: A New ApproachShipping and Storage: A New Approach
Shipping and Storage: A New Approach
 
Sales and inventory management project report
Sales and inventory management project reportSales and inventory management project report
Sales and inventory management project report
 
Data flow diagram for order system
Data flow diagram for order systemData flow diagram for order system
Data flow diagram for order system
 
Data flow diagram
Data flow diagramData flow diagram
Data flow diagram
 
Medical store management system
Medical store management systemMedical store management system
Medical store management system
 
Analog term paper
Analog term paperAnalog term paper
Analog term paper
 
Photo-Elctric Effect
Photo-Elctric EffectPhoto-Elctric Effect
Photo-Elctric Effect
 
Tictac
TictacTictac
Tictac
 
Ticket window & automation system
Ticket window & automation systemTicket window & automation system
Ticket window & automation system
 
Tic tac toe
Tic tac toeTic tac toe
Tic tac toe
 
Term paper of cse(211) avdhesh sharma c1801 a24 regd 10802037
Term paper of cse(211) avdhesh sharma c1801 a24 regd 10802037Term paper of cse(211) avdhesh sharma c1801 a24 regd 10802037
Term paper of cse(211) avdhesh sharma c1801 a24 regd 10802037
 
Snake game implementation in c
Snake game implementation in cSnake game implementation in c
Snake game implementation in c
 
Tic tac toe game code
Tic tac toe game codeTic tac toe game code
Tic tac toe game code
 
Bluetooth technology
Bluetooth technologyBluetooth technology
Bluetooth technology
 

Recently uploaded

High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 

Recently uploaded (20)

High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 

Telephone directory in c

  • 1. TERM PAPER Of fOUNDATION Of COMPUTING TOPIC: - TELEPHONE DIRECTORY SUbMITTED TO: - SUbMITTED bY:- MS. SUkHDILPREET kAUR ASHUTOSH kUMAR ROLL NO.:- R246b47 REGD. NO:- 10801374 1
  • 2. ACkNOWLEDGEMENT It is not until you undertake the project like this one that you realize how massive the effort it really is, or how much you must rely upon the Selfless efforts and goodwill of others. There are many who helped us with this project, and we want to thank them all from the core of our Hearts. We owe special words of thanks to our Teachers MS.SUKHDILPREET KAUR for their vision, thoughtful counseling and encouragement at every step of the project. We are also thankful to the teachers of the Department for giving us the best of knowledge and guidance throughout the project. And last but not the least, we find no words to acknowledge the financial assistance & moral support rendered by our parents in making the effort a success. All this has become reality because of their blessings and above all by the grace of god. ASHUTOSH KUMAR ROLL NO:-R246B47 REGD.ID:-10801374 2
  • 3. TAbLE Of CONTENTS S.No Content Page no. 1 Introduction 4 2 System Requirement 8 3 System Description 9 4 System Design 10 5 Source code 11 6 Output 29 7 Testing 32 8 Future scope 33 3
  • 4. INTRODUCTION: We have discussed so far various features of C language and are ready to write and execute program of modest complexity. However, before attempting to develop complex programs, it is worthwhile to consider some programming techniques that would help design efficient and error free. The program development process includes three important stages, namely, program design, program coding and program testing. All the three stages contribute to the production of high quality program. In “TELEPHONE DIRECTORY” we have done system design, source coding, and program testing and added many more features to facilitate the user with the best. We have given the user the facility to enter the person’s record and providing the option to save and delete that record and many more options. We can improve the efficiency of the system, thus overcome the drawbacks of the existing system. · Less human error · Strength and strain of manual labour can be reduced · High security · Data consistency · Easy to handle · Easy data updating · Easy record keeping · Backup data can be easily genera 4
  • 5. OVERVIEW TO C HISTORY Of C: C is a popular general purpose programming language. It is one of the most popular computer languages today, because it is a structured, high level, machine independent language. The root of all modern language is ALGOL, introduced in early 1960’s. ALGOL was the 1st computer language to use a block structure. Subsequently, several other languages were announced after 1960’s. In 1967, Martin Richard developed a language called BCPL i.e. basic combined programming language mainly for writing system software. In 1970, Ken Thompson created a language using many features of BCPL and called it simply B. B was used to create early version of UNIX operating system. C was evolved from ALGOL, BCPL, and B by Dennis Ritchie at the Bell Laboratories in 1972, strongly associated with UNIX. During 1970’s, C had evolved into the “TRADITIONAL C”. With the publication of the book ‘The C Programming language’ by Brian Kerningham and Dennis Ritchie in 1978, it becomes more powerful. In 1983, American National Standards Institutes (ANSI) appointed a technical committee to define a standard for C. The committee approved a version of C in December 1989, which is now known as ANSI C. It was then approved by International Standard Organization (ISO) in 1990. 5
  • 6. IMPORTANCE Of C: The increasing popularity of C is probably due to its many desirable qualities. The C compiler combines the capabilities of an assembly language with the features of a high level language and therefore it is well suited for writing both system software and business packages. In fact many of the C compilers available in the market are written in C. Programs written in C are efficient and fast. This is due to its variety of data types and powerful operators. It is many times faster than BASIC. There are only 32 key words in ANSI C and its strength lies in its built in functions. C is highly portable; this means that C programs written for one computer can be run on another with little or no modifications. C language is well suited for structured programming, thus requiring the user to think of a problem in terms of function modules or blocks. This modular structure makes program de-bugging, testing and maintenance easier.Another important feature of C is its ability to extend itself. We can continuously add our own functions to C library, thus our programming task becomes so easier and simple. 6
  • 7. INTRODUCTION Of TELEPHONE DIRECTORY We can make this TELEPHONE DIRECTORY in C language by using three or more than three header files or many data types such as: 1. #include<stdio.h> : this header file will contain Scanf() , Printf () And, there are many header files which are used in this program…. 2. #include<conio.h>: this header file will contain Clrscr(); , Getch(); , and many more….. 3 . #include<string.h> : this header file will contain string function such as 1.Strrev(); 2. Strlen(); 3. Strupr(); 4. Strlwr(); 5. And many mores…… 7
  • 8. SYSTEM REQUIREMENTS Operating System: Windows 2000/NT/Xp/Vista RAM: 256 MB or more HARD DISK 40 GB or more Processor P3 or High Compiler Standard C++ Compiler 8
  • 9. SYSTEM DESCRIPTION THE OPERATING SYSTEM USED IN THIS PROJECT IS WINDOWSXPIT HAS MICROSOFT OFFICE INSTALLED IN IT. IT HAS RAM OF 2GB. HARD DISK CAPACITY OF OPERATING SYSTEM IS 250GB. IT CONSISTS OF PENTIUM-4 PROCESSOR.THE OPEREATING SYSTEM ALSO HAS C++ COMPILER. THE SYSTEM ALSO HAS TYPE CONVERSIONS WHICH CONVERT LOWER TO UPPER TYPE. THE OPERATING SYSTEM HAVE 1GB RAM FOR MICROSOFT WORLD. 9
  • 10. system design: SAVE ENTRY IF YES IF NO 10 START WELCOME TO THE MAIN MENU ENTER YOUR CHOICE NEW ENTRY DISPLAY AN ENTRY DELETE AN ENTRY DISPLAY ALL ENTRIES EMPTY THE BOOK LOAD ENTRIES DELETE ALL FILES END STOP IF U WANT TO CONTINUE
  • 11. sOURCe COde #include<stdio.h> #include<stdlib.h> #include<conio.h> #include<alloc.h> #include<string.h> #include<graphics.h> struct entry { char name[50]; char nick[50]; char email[50]; char address[50]; char city[50]; char cont[50]; char pin[50]; struct entry *lptr; struct entry *rptr; }*temp,*newe,*l,*r; typedef struct entry *list; 11
  • 12. void newentry(); void display(char n[50]); void deletentry(char n[50]); void displayall(); void makempty(); int isempty(); void saventry(); void loadentry(); void deleteall(); void newentry() { char a[50],b[50],f[50],g[50],c[50],d[50],e[50]; int i,k=0; printf("Enter the Datas for the New Entry:"); printf("Name :"); scanf("%s",a); printf("Nick name :"); scanf("%s",b); printf("E-mail ID :"); scanf("%s",c); printf("Address :"); scanf("%s",d); printf("City :"); 12
  • 13. scanf("%s",e); printf("Contact No:"); scanf("%s",f); printf("Pincode :"); scanf("%s",g); newe=(struct entry*)malloc(sizeof(struct entry)); for(i=0;i<50;i++) { newe->name[i]=' '; newe->nick[i]=' '; newe->email[i]=' '; newe->address[i]=' '; newe->city[i]=' '; newe->cont[i]=' '; newe->pin[i]=' '; } for(i=0;i<50;i++) { newe->name[i]=a[i]; newe->nick[i]=b[i]; newe->email[i]=c[i]; newe->address[i]=d[i]; newe->city[i]=e[i]; 13
  • 14. newe->cont[i]=f[i]; newe->pin[i]=g[i]; } if(isempty()) { newe->lptr=newe->rptr=NULL; l=r=newe; printf("Your Entry is Added"); } else { temp=l; while(temp!=NULL) { i=stricmp(newe->name,temp->name); if(i<0) break; else if(i>0) temp=temp->rptr; else if(i==0) { printf("Name Already Exists.Entry cannot be Added"); k=1; 14
  • 15. break; } } if(k!=1) { if(temp==l) { newe->lptr=NULL; newe->rptr=l; l->lptr=newe; l=newe; printf("Your Entry is Added"); } else if(temp==NULL) { newe->rptr=NULL; newe->lptr=r; r->rptr=newe; r=newe; printf("Your Entry is Added"); } else { 15
  • 16. newe->rptr=temp; newe->lptr=temp->lptr; temp->lptr=newe; (newe->lptr)->rptr=newe; printf("Your Entry is Added"); } } } } void displayall() { int n=1; if(!isempty()) { temp=l; while(temp!=NULL) { printf("[%d] Name :%s Nick Name :%s E-mail ID :%s address :%s City :%s Contact.No:%s Pin code :%s",n,temp->name,temp->nick,temp- >email,temp->address,temp->city,temp->cont,temp->pin); temp=temp->rptr; n++; } 16
  • 17. } else printf("Address Book is Empty"); } void deletentry(char n[50]) { int i; if(isempty()) printf("Address Book is Empty"); else{ temp=l; while(temp!=NULL) { i=stricmp(temp->name,n); if(i==NULL) { if(l==r) { l=r=NULL; printf("Entry deleted"); break; } 17
  • 18. else if(temp==l) { l=l->rptr; l->lptr=NULL; printf("Entry deleted"); break; } else if(temp==r) { r=r->lptr; r->rptr=NULL; printf("Entry deleted"); break; } else{ (temp->lptr)->rptr=temp->rptr; (temp->rptr)->lptr=temp->lptr; printf("Entry deleted"); break; } } temp=temp->rptr; 18
  • 19. } if(temp==NULL) printf("Not Found"); } } int isempty() { return l==NULL; } void makempty() { l=r=NULL; printf("Address Book is Emptied"); } void display(char n[50]) { int i,p=1; 19
  • 20. if(isempty()) printf("Address Book is Empty"); else { temp=l; while(temp!=NULL) { i=stricmp(temp->name,n); if(i==NULL) {if(p==1) printf("Entry is found in %dst position",p); else if(p==2) printf("Entry is found in %dnd position",p); else if (p==3) printf("Entry is found in %drd position",p); else printf("Entry is found in %dth position",p); printf("Name :%s Nick Name :%s E-mail ID :%s address :%s City : %s Contact.No:%s Pin code :%s ",temp->name,temp->nick,temp- >email,temp->address,temp->city,temp->cont,temp->pin); break; } temp=temp->rptr; 20
  • 21. p++; } if(temp==NULL) printf("Entry Not Found"); } } void main() { int l=1,m; int gd=DETECT,gm; char n[50]; initgraph(&gd,&gm,"c:tcbgi"); while(l!=8) { clrscr(); textmode(C80); textcolor(4); cprintf("********************************************************* ***********************#------------------------MINI PROJECT-TELEPHONE DIRECTORY --------------------#*************************************************** *****************************"); cprintf("Enter Your Choice"); 21
  • 22. printf(" "); cprintf("(1)-New Entry"); printf(" "); cprintf("(2)-Display an Entry"); printf(" "); cprintf("(3)-Delete an Entry"); printf(" "); cprintf("(4)-Display all Entries"); printf(" "); cprintf("(5)-Empty the book"); printf(" "); cprintf("(6)-Save Entry"); printf(" "); cprintf("(7)-Load Entries"); printf(" "); cprintf("(8)-Delete All Saved Files"); printf(" "); cprintf("(9)-End"); printf(" "); cprintf("********************************************************* ***********************"); printf(" "); scanf("%d",&l); 22
  • 23. switch(l) { case 1: textcolor(2); newentry(); getch(); break; case 2: textcolor(2); cprintf("Enter the Name of the Person to Display"); printf(" "); scanf("%s",&n); display(n); getch(); break; case 3: textcolor(2); cprintf("Enter the Name of the Person to Delete"); printf(" "); scanf("%s",&n); deletentry(n); getch(); break; 23
  • 24. case 4: textcolor(2); displayall(); getch(); break; case 5: textcolor(2); makempty(); getch(); break; case 6: textcolor(2); saventry(); getch(); break; case 7: textcolor(2); loadentry(); getch(); break; case 8: textcolor(2); deleteall(); 24
  • 25. getch(); break; case 9: textcolor(2); printf("Program Ends Here.Thank You!!!"); printf(" "); getch(); break; default: textcolor(2); printf("Enter a Valid Choice from 1-9 only"); printf(" "); getch(); break; } } getch(); } void saventry() { char n[50]; int c; list t; 25
  • 26. int i;t=l; printf("Enter the Name of the Person"); scanf("%s",n); if(isempty()) printf("Address Book is Empty"); else { FILE *f; f=fopen("entry.c","a"); while(t!=NULL) { i=stricmp(t->name,n); if(i==0) { fprintf(f,"%s %s %s %s %s %s %s",t->name,t->nick,t->email,t->address,t->city,t- >cont,t->pin); printf("Your Entry Saved"); printf("Add Another Entry? (1-yes/2-no)"); scanf("%d",&c); if(c==1) saventry(); else if(c==2) break; 26
  • 27. } t=t->rptr; } fclose(f); if(t==NULL) printf("Entry Not Found"); } } void loadentry() { int i=1; list t; FILE *f; f=fopen("entry.c","r"); if(f==NULL) { printf("Cannot Open"); exit(1); } while(fscanf(f," %s %s %s %s %s %s %s",t->name,t->nick,t->email,t- >address,t->city,t->cont,t->pin)!=EOF) { printf("[%d] Name :%s Nick Name :%s E-mail ID :%s address :%s City :%s Contact.No:%s Pin code :%s",i,t->name,t- >nick,t->email,t->address,t->city,t->cont,t->pin); 27
  • 28. i++;} fclose(f); } void deleteall() { FILE *f; f=fopen("entry.c","w"); fclose(f); printf("all saved files were delete"); } 28
  • 30. 30
  • 31. 31
  • 32. TESTING THE SOURCECODE DECLARED ABOVE FOR THE PROGRAM OF TELEPHONE DIRECTORY HAS BEEN TESTED AND IT HAS BEEN FOUND THAT THE ABOVE SOURCE CODE IS OKAY AND CORRECT.THE PROGRAM INVOLVES MANY TYPE OF CONVERSIONS. THESE CONVERSIONS HAS TO DONE CAREFULLY. MAINLY THERE ARE TWO TYPES OF TESTING: 1-SYSTEM TESTING AND 2-INTEGRATION TESTING SYSTEM TESTING INVOLVES WHOLE TESTING OF PROGRAM AT ONCE AND INTEGRATION TESTING INVOLVES THE BREAKING OF PROGRAM INTO MODULES & THEN TEST. 32
  • 33. FUTURE SCOPE In future one change can be done by adding the fingerprints of the persons of which the address is entered.And one more major change which can be done in this project is that to add the snaps of the person of which the address is entered.We can also add or subtract details of the individual. 33