Add to Favorites    Make Home Page 5673 Online  
 Language Categories  
 Our Services  

Home » ASP Home » ADO Home » Telephone Directory


Search Projects & Source Codes:

Title Telephone Directory
Author dhivya
Author Email coolgal89 [at]
Category ASP » ADO
Hits 390022
Code Select and Copy the Code
Code : /************************************************************************* PROJECT ON ELECTRONIC DAIRY MADE BY:- DIVYA BATRA XII-A ************************************************************************** / /************************************************************************* HEADER FILE FUNCTIONS process.h exit() dos.h delay() conio.h clrscr() gotoxy() textbackground() textcolor() getch() stdio.h gets() string.h strcmp() fstream.h open() close() ************************************************************************** */ #include<process.h> #include<dos.h> #include<conio.h> #include<fstream.h> #include<stdio.h> #include<string.h> //************************************************************************ ** // Structure of telephone directory //************************************************************************ ** struct tel { char telno[20]; char name[20]; char add[20]; }s; //************************************************************************ ** // Functions //************************************************************************ ** void display(void); void enquiryt(void); void enquiryn(void); void delet(void); void option(void); void des(void); void box_fill(void); //************************************************************************ ** // Main Function //************************************************************************ ** main() { clrscr(); textbackground(3); textcolor(4); for (int i=1;i<24;i++) { clrscr(); gotoxy(i,1); cprintf(" ***Telephone Directory*** "); delay(100); } for (int o=2;o<7;o++) { clrscr(); gotoxy(23,o); cout<<" ***Telephone Directory*** "; delay(100); } delay(1000); gotoxy(33,9); cout<<" Made By:- "; delay (1000); gotoxy(31,11); cout<<" Divya Batra "; delay(1000); gotoxy(32,13); cout<<" Class XII-A "; delay(1000); gotoxy(22,15); cout<<" The Heritage School Vasant Kunj "; delay(3000); getch(); option(); } //************************************************************************ ** // Main Menu //************************************************************************ ** void option(void) { clrscr(); int j; box_fill(); gotoxy(30,3); cout<<"***** MAIN MENU *****"; gotoxy(15,6); cout<<" 1. Add Records. "; gotoxy(15,8); cout<<" 2. Get enquiry from telephone number. "; gotoxy(15,10); cout<<" 3. Get enquiry from names of person. "; gotoxy(15,12); cout<<" 4. Delete Records. "; gotoxy(15,14); cout<<" 5. Exit. "; gotoxy(15,16); cout<<" Enter your choice:"; cin>>j; switch(j) { case 1: display(); break; case 2: enquiryt(); break; case 3: enquiryn(); break; case 4: delet(); break; default: exit(1); } } void des(void) { gotoxy(10,23); cout<<" Press any key to see main menu again..... "; getch(); option(); } //************************************************************************ ** // Function to create file of people //************************************************************************ ** void display(void) { clrscr(); char ans; ans='y'; ofstream fp;"Tel.dat",ios::app); do { box_fill(); // char ch=cin.get(); gotoxy(13,6); cout<<" Telephone number:"; gets(s.telno); gotoxy(13,8); cout<<" Name of Person:"; gets(; gotoxy(13,10); cout<<" Address:"; cin>>s.add; fp.write((char *)&s,sizeof(tel)); gotoxy(13,12); cout<<" Do you want to Continue:"; cin>>ans; } while(ans=='y'); fp.close(); des(); } //************************************************************************ ** // Function to get enquiry by telephone from main file //************************************************************************ ** void enquiryt(void) { char v[20]; clrscr(); ifstream fp5;"Tel.dat"); box_fill(); gotoxy(15,10); cout<<" Enter the desire telephone number:"; cin>>v; while(fp5) { *)&s,sizeof(tel)); if(!fp5) break; if(strcmp(s.telno,v)==0) { gotoxy(15,14); cout<<" Telephone Number: "<<s.telno; gotoxy(15,16); cout<<" Name: "<<; gotoxy(15,18); cout<<" Address: "<<s.add; } } fp5.close(); des(); } //************************************************************************ ** // Function to get enquiry by name from main file //************************************************************************ ** void enquiryn(void) { char a[20]; clrscr(); ifstream fp5;"Tel.dat"); box_fill(); gotoxy(15,10); cout<<" Enter the name:"; cin>>a; while(fp5) { *)&s,sizeof(tel)); if(!fp5) break; if(strcmp(a, { gotoxy(15,14); cout<<" Telephone Number: "<<s.telno; gotoxy(15,16); cout<<" Name: "<<; gotoxy(15,18); cout<<" Address: "<<s.add; } } fp5.close(); des(); } //************************************************************************ ** // Function to delete any record from main file //************************************************************************ ** void delet(void) { char v[20]; clrscr(); ifstream fp;"Tel.dat"); ofstream fp1;"Tel1.dat"); while(fp) { *)&s,sizeof(tel)); if(!fp) break; fp1.write((char *)&s,sizeof(tel)); } fp.close(); fp1.close(); ifstream afile; ofstream bfile;"Tel1.dat");"Tel.dat"); box_fill(); gotoxy(14,10); cout<<" Enter the telephone number to be deleted: "; cin>>v; while(afile) { *)&s,sizeof(tel)); if(!afile) break; if(strcmp(s.telno,v)!=0) { bfile.write((char *)&s,sizeof(tel)); } } bfile.close(); afile.close(); des(); } //************************************************************************ ** // Procedure for creating box for menues and prompts //************************************************************************ ** void box_fill(void) { int xr,xc; int la,ra; gotoxy(10,2); for(xr=1;xr<=60;xr++) cout<<"*"; xc=3; for(la=1;la<=19;la++) { gotoxy(10,xc); cout<<"()"; gotoxy(69,xc); cout<<"()"; xc++; } gotoxy(10,22); for(xr=1;xr<=60;xr++) cout<<"*"; }

Related Source Codes

Script Name Author
ııııııııııııııııııııı VyomWorld
Resistor color code reader A.Chermarajan.
card swapping game (Mini Project) nityanand
simple hangman-pascalsource Seabert
college dirtectory (Mini Project) msridhar
Poll Application John van Meter
ASP Daily Hit Counter. Tejaskumar Gandhi
To avoid null in asp environment using sql Sami
Maklumbalas webmaster
poll John van Meter
EasyASP Template Engine. TjoekBezoer
Basic Calculator using HTML & Javascript. Patrick M. D Souza
What servers support ASP ? VyomWorld
What is ASP? VyomWorld
European Weeknumber menno


Google Groups Subscribe to SourceCodesWorld - Techies Talk

Free eBook - Interview Questions: Get over 1,000 Interview Questions in an eBook for free when you join JobsAssist. Just click on the button below to join JobsAssist and you will immediately receive the Free eBook with thousands of Interview Questions in an ebook when you join.

New! Click here to Add your Code!

ASP Home | C Home | C++ Home | COBOL Home | Java Home | Pascal Home
Source Codes Home Page


Google Search


Source Codes is a part of Vyom Network.

Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Interview Questions | Jobs, Discussions | Placement Papers | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | Arabic, French, German | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Software Testing | Google Logo Maker | Freshers Jobs

Sitemap | Privacy Policy | Terms and Conditions | Important Websites
Copyright ©2003-2024, All Rights Reserved.
Page URL:

Download Yahoo Messenger | Placement Papers | Free SMS | C Interview Questions | C++ Interview Questions | Quick2Host Review