SlideShare a Scribd company logo
1 of 11
Comsats Institute Of Information And Technology Islamabad Chak Shahzad

Haq Nawaz CH
Sp12-BCS-089
Student Data Base program C/C++
Output :
C/C++ CODE
#include<iostream>
#include<conio.h>
#include<cstring>
#include<ctype.h>
#include<stdlib.h>
#include<stdio.h>
using namespace std;
void show1();
void pass();
void menu();
void entrec();
void modpass();
void modrec();
void mdf();
void show();
void upd_rec();
void srch();
void exit();
void hid();
void del();
int t=0;
struct name { char first_name[20];
char last_name[20];
};
struct pass
{ char name[20];
char pass[20];
}user;
struct bio_data
{
name ful_name;
char add[100];
int age;
int phon_num;
char gender[10];
};
bio_data p[10];
int i=0;
int main()
{
char hid[11];
for (int t=0;t<10;t++)
hid[t]=0;
strcpy(user.name,"ABC");
strcpy(user.pass,"ABC");
pass();
getch();
}
void pass() //defination of password
{ system("cls");
char name[20];
char password[20];
cout<<"Enter user name"<<"t:";
cin>>name;
cout<<"Enter password"<<"t:";
cin>>password;
int c,c1;
int i=0;
char pw;
c=strcmp(name,user.name);
c1=strcmp(password,user.pass);
if(c==0&&c1==0)
{

}
else

system("cls");
cout<<"welcome menue"<<endl;
menu();
getch();

if(c!=0||c1!=0)
{ system("cls");
cout<<"login not match try again";
}
getch();
pass();
// cout<<"modify passw";
}
void menu()
{ system("cls");
cout<<"ttt______________________________"<<endl;
cout<<"ttttwelcome to Menu"<<endl;
cout<<"tttt1:Enter Record"<<endl;
cout<<"tttt2:Show Record"<<endl;
cout<<"tttt3:Modify Record"<<endl;
cout<<"tttt4:Hide Record"<<endl;
cout<<"tttt5:Delete Record"<<endl;
cout<<"tttt6:Modify Password"<<endl;
cout<<"tttt7:Search Record"<<endl;
cout<<"tttt8:Exit Menu"<<endl;
cout<<"ttt______________________________"<<endl;
int choice;
cout<<"Enter your choice:t";
cin>>choice;
switch(choice)
{
case 1:
entrec();
break;
case 2:

show();
break;

case 3:

mdf();
break;

case 4:

hid();
break;

case 5:
case 6:

srch();

del();

break;
modpass();

break;

case 7:

break;

case 8:
exit();
}
menu();

break;
}
void modpass()
{ system("cls");
cout<<"ttEnter new password"<<endl;
char pw;
int i=0;
cin>>user.pass;
system("cls");
cout<<"ttPassword Cahnged"<<endl;
cout<<"ttPress Enter to Continue"<<endl;
pass();
getch();
}
void entrec()
{ system("cls");
cout<<"enter number of record you want to add"<<endl;
int n;
cin>>n;
for(int i=1;i<=n;i++)
{
cout<<"_______________"<<endl;
cout<<"enter 1st name :t";
cin>>p[i].ful_name.first_name;
cout<<"enter last name:t";
cin>>p[i].ful_name.last_name;
cout<<"address
:t";
cin>>p[i].add;
cout<<"age
:t";
cin>>p[i].age;
cout<<"phon
:t";
cin>>p[i].phon_num;
cout<<"gender
:t";
cin>>p[i].gender;
getch();
}
}
void del()
{ system("cls");
cout<<"enter required out put numbert"<<endl;
int n,a;
cin>>n;
a=0;
char lname[20];
cout<<"enter last name to del record"<<endl;
cin>>lname;
for(int i=1;i<=n;i++){
if(strcmp(p[i].ful_name.last_name,lname)==0)
{
cout<<"t----------------------------------"<<endl;
cout<<"tfirst name:t"<<p[i].ful_name.first_name=='0';
cout<<"tlast name :t"<<(p[i].ful_name.last_name)=='0';
cout<<"taddress :t"<<p[i].add=='0';
cout<<"tphone# :t"<<p[i].phon_num=='0';
cout<<"tage
:t"<<p[i].age=='0';
cout<<"tgender :t"<<p[i].gender=='0';
cout<<"t----------------------------------"<<endl;
}a++;
cout<<"showing records:"<<a<<endl;
getch();
}
}
void mdf()
{
system("cls");
int n;
char lname[20];
cout<<"enter last name"<<endl;
cin>>lname;
//cout<<"search upto ....num?"<<endl;
//cin>>n;
for(int i=1;i<=9;i++)
{
if(strcmp(p[i].ful_name.last_name,lname)==0)
{
cout<<"enter 1st name:t";
cin>>p[i].ful_name.first_name;
cout<<"enter last name:t";
cin>>p[i].ful_name.last_name;
cout<<"address:t";
cin>>p[i].add;
cout<<"age:t";
cin>>p[i].age;
cout<<"phon:t";
cin>>p[i].phon_num;
cout<<"gender:t";
cin>>p[i].gender;
}
//getch();
} getch();
menu();
}
void show1()
{ system("cls");
for(int i=1;i<=5;i++)
{
cout<<"t----------------------------------"<<endl;
cout<<"tfirst name:tt"<<p[i].ful_name.first_name<<endl;
cout<<"tlast name :tt"<<p[i].ful_name.first_name<<endl;
cout<<"taddress :tt"<<p[i].add<<endl;
cout<<"tage
:tt"<<p[i].phon_num<<endl;
cout<<"tgendr :tt"<<p[i].age<<endl;
cout<<"tphon num :tt"<<p[i].gender<<endl;
cout<<"t----------------------------------"<<endl;
} //break;
getch();
}
void exit()
{
exit(0);
}
void hid()
{
char hide[t];
for (int t=0;t<10;t++)
hide[t]=0;
char nme[20];
char h;
h=0;
cout<<"Please Enter last name to hide:";
cin>>nme;
for (int i=0;i<9;i++)
{

if (strcmp(p[i].ful_name.last_name,nme)==0)
{
hide[i]=1;
}
h=1;

}
cout<<"Hidden Successful"<<endl;
if (h==0)
cout<<"Record not Available"<<endl;
getch();
menu();
}

void srch()
{
system("cls");
char hide[10];
for (int t=0;t<10;t++)
hide[t]=0;
char nm[20];
char a;
a=0;
cout<<"nEnter Patient Last Name:";
cin>>nm;
for (int i=0;i<9;i++)
{
if (strcmp(p[i].ful_name.last_name,nm)==0 && hide[i]==0)
{
cout<<"tt------------------------";
cout<<"ntt1 Record match!!!n";
cout<<"nttFirst Name
:";
cout<<p[i].ful_name.first_name;
cout<<"nttPatient Last Name :";
cout<<p[i].ful_name.last_name;
cout<<"nttPatient Phone number:";
cout<<p[i].phon_num;
cout<<"nttPatient Age
:";
cout<<p[i].age;
cout<<"nttPatient gender :";
cout<<p[i].gender<<endl;
cout<<"tt------------------------n";
cout<<"nnn";
a=1;
}
}

getch();
menu();}

if (a==0)
cout<<"nRecord not availablen";

void show()
{
system("cls");
char hide[10];
for (int t=0;t<10;t++)
hide[t]=0;
for (int i=0;i<9;i++)
{
if (hide[i]==0&& strlen(p[i].ful_name.last_name)>0)
{
cout<<"nRecord number t :"<<i+1;
cout<<"nPatient First Namet :";
cout<<p[i].ful_name.first_name;
cout<<"nPatient Last Namet :";
cout<<p[i].ful_name.last_name;
cout<<"nPatient Phone numbert:";
cout<<p[i].phon_num;
cout<<"nPatient Address t:";
cout<<p[i].add;
cout<<"nPatient Age
t:";
cout<<p[i].age;
cout<<"nPatient gender t:";
cout<<p[i].gender;
cout<<endl;
}
}getch();
}
/*void del()
{ system("cls");
char name[22];
cout<<"enter 1st name to dell"<<endl;
cin>>name;
int a,b;
for(int i=0;i<=9;i++)
{
a=strcmp(name,p[i].ful_name.first_name);
if(a==0)
{
cout<<p[i].ful_name.first_name=='0';
cout<<p[i].ful_name.last_name=='0';
cout<<p[i].add=='0';
cout<<p[i].phon_num=='0';
cout<<p[i].age=='0';
cout<<p[i].gender=='0';
}
}
cout<<"record deleted"<<endl;
getch();
}
*/

More Related Content

What's hot

systems programming lab programs in c
systems programming lab programs in csystems programming lab programs in c
systems programming lab programs in c
Meghna Roy
 
Program for hamming code using c
Program for hamming code using cProgram for hamming code using c
Program for hamming code using c
snsanth
 
c++ program for Railway reservation
c++ program for Railway reservationc++ program for Railway reservation
c++ program for Railway reservation
Swarup Kumar Boro
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd march
Rajeev Sharan
 
Assignment no39
Assignment no39Assignment no39
Assignment no39
Jay Patel
 
Declaring friend function with inline code
Declaring friend function with inline codeDeclaring friend function with inline code
Declaring friend function with inline code
Rajeev Sharan
 

What's hot (20)

C++ programs
C++ programsC++ programs
C++ programs
 
Computer science Investigatory Project Class 12 C++
Computer science Investigatory Project Class 12 C++Computer science Investigatory Project Class 12 C++
Computer science Investigatory Project Class 12 C++
 
systems programming lab programs in c
systems programming lab programs in csystems programming lab programs in c
systems programming lab programs in c
 
Computer Science investigatory project class 12
Computer Science investigatory project class 12Computer Science investigatory project class 12
Computer Science investigatory project class 12
 
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12THBANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
 
Program for hamming code using c
Program for hamming code using cProgram for hamming code using c
Program for hamming code using c
 
c++ program for Railway reservation
c++ program for Railway reservationc++ program for Railway reservation
c++ program for Railway reservation
 
Basic Programs of C++
Basic Programs of C++Basic Programs of C++
Basic Programs of C++
 
Supermarket
SupermarketSupermarket
Supermarket
 
Introduzione a C#
Introduzione a C#Introduzione a C#
Introduzione a C#
 
System programs in C language.
System programs in C language.System programs in C language.
System programs in C language.
 
System programmin practical file
System programmin practical fileSystem programmin practical file
System programmin practical file
 
C programs
C programsC programs
C programs
 
C++ Programming - 1st Study
C++ Programming - 1st StudyC++ Programming - 1st Study
C++ Programming - 1st Study
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd march
 
Opp compile
Opp compileOpp compile
Opp compile
 
Railwaynew
RailwaynewRailwaynew
Railwaynew
 
Assignment no39
Assignment no39Assignment no39
Assignment no39
 
Computer Investgatort Project (HOTEL MANAGEMENT SYSTEM)
Computer Investgatort Project (HOTEL MANAGEMENT SYSTEM)Computer Investgatort Project (HOTEL MANAGEMENT SYSTEM)
Computer Investgatort Project (HOTEL MANAGEMENT SYSTEM)
 
Declaring friend function with inline code
Declaring friend function with inline codeDeclaring friend function with inline code
Declaring friend function with inline code
 

Similar to Student Data Base Using C/C++ Final Project

Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! 
aleks-f
 
C basics
C basicsC basics
C basics
MSc CST
 
Assignement of programming & problem solving u.s ass.(1)
Assignement of programming & problem solving u.s ass.(1)Assignement of programming & problem solving u.s ass.(1)
Assignement of programming & problem solving u.s ass.(1)
Syed Umair
 

Similar to Student Data Base Using C/C++ Final Project (20)

C program
C programC program
C program
 
P5
P5P5
P5
 
Railway reservation
Railway reservationRailway reservation
Railway reservation
 
Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! 
 
Cd practical file (1) start se
Cd practical file (1) start seCd practical file (1) start se
Cd practical file (1) start se
 
Pattern printing-in-c(Jaydip Kikani)
Pattern printing-in-c(Jaydip Kikani)Pattern printing-in-c(Jaydip Kikani)
Pattern printing-in-c(Jaydip Kikani)
 
Gaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third YearGaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third Year
 
C programming structure & pointer
C  programming structure & pointerC  programming structure & pointer
C programming structure & pointer
 
Assignement of c++
Assignement of c++Assignement of c++
Assignement of c++
 
Ccc
CccCcc
Ccc
 
pattern-printing-in-c.pdf
pattern-printing-in-c.pdfpattern-printing-in-c.pdf
pattern-printing-in-c.pdf
 
C basics
C basicsC basics
C basics
 
C++ programming structure & union
C++ programming structure & unionC++ programming structure & union
C++ programming structure & union
 
RAILWAY RESERWATION PROJECT PROGRAM
RAILWAY RESERWATION PROJECT PROGRAMRAILWAY RESERWATION PROJECT PROGRAM
RAILWAY RESERWATION PROJECT PROGRAM
 
Assignement of programming & problem solving u.s ass.(1)
Assignement of programming & problem solving u.s ass.(1)Assignement of programming & problem solving u.s ass.(1)
Assignement of programming & problem solving u.s ass.(1)
 
C program to implement linked list using array abstract data type
C program to implement linked list using array abstract data typeC program to implement linked list using array abstract data type
C program to implement linked list using array abstract data type
 
Data struture lab
Data struture labData struture lab
Data struture lab
 
C programms
C programmsC programms
C programms
 
Ss
SsSs
Ss
 
Bca 1st year C langauge .pdf
Bca 1st year C langauge .pdfBca 1st year C langauge .pdf
Bca 1st year C langauge .pdf
 

Recently uploaded

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 

Student Data Base Using C/C++ Final Project

  • 1. Comsats Institute Of Information And Technology Islamabad Chak Shahzad Haq Nawaz CH Sp12-BCS-089
  • 2. Student Data Base program C/C++ Output :
  • 3. C/C++ CODE #include<iostream> #include<conio.h> #include<cstring> #include<ctype.h> #include<stdlib.h> #include<stdio.h> using namespace std; void show1(); void pass(); void menu(); void entrec(); void modpass(); void modrec(); void mdf(); void show(); void upd_rec(); void srch(); void exit(); void hid(); void del(); int t=0; struct name { char first_name[20]; char last_name[20]; }; struct pass { char name[20]; char pass[20]; }user; struct bio_data { name ful_name; char add[100]; int age; int phon_num; char gender[10]; }; bio_data p[10]; int i=0;
  • 4. int main() { char hid[11]; for (int t=0;t<10;t++) hid[t]=0; strcpy(user.name,"ABC"); strcpy(user.pass,"ABC"); pass(); getch(); } void pass() //defination of password { system("cls"); char name[20]; char password[20]; cout<<"Enter user name"<<"t:"; cin>>name; cout<<"Enter password"<<"t:"; cin>>password; int c,c1; int i=0; char pw; c=strcmp(name,user.name); c1=strcmp(password,user.pass); if(c==0&&c1==0) { } else system("cls"); cout<<"welcome menue"<<endl; menu(); getch(); if(c!=0||c1!=0) { system("cls"); cout<<"login not match try again"; } getch(); pass(); // cout<<"modify passw"; }
  • 5. void menu() { system("cls"); cout<<"ttt______________________________"<<endl; cout<<"ttttwelcome to Menu"<<endl; cout<<"tttt1:Enter Record"<<endl; cout<<"tttt2:Show Record"<<endl; cout<<"tttt3:Modify Record"<<endl; cout<<"tttt4:Hide Record"<<endl; cout<<"tttt5:Delete Record"<<endl; cout<<"tttt6:Modify Password"<<endl; cout<<"tttt7:Search Record"<<endl; cout<<"tttt8:Exit Menu"<<endl; cout<<"ttt______________________________"<<endl; int choice; cout<<"Enter your choice:t"; cin>>choice; switch(choice) { case 1: entrec(); break; case 2: show(); break; case 3: mdf(); break; case 4: hid(); break; case 5: case 6: srch(); del(); break; modpass(); break; case 7: break; case 8: exit(); } menu(); break;
  • 6. } void modpass() { system("cls"); cout<<"ttEnter new password"<<endl; char pw; int i=0; cin>>user.pass; system("cls"); cout<<"ttPassword Cahnged"<<endl; cout<<"ttPress Enter to Continue"<<endl; pass(); getch(); } void entrec() { system("cls"); cout<<"enter number of record you want to add"<<endl; int n; cin>>n; for(int i=1;i<=n;i++) { cout<<"_______________"<<endl; cout<<"enter 1st name :t"; cin>>p[i].ful_name.first_name; cout<<"enter last name:t"; cin>>p[i].ful_name.last_name; cout<<"address :t"; cin>>p[i].add; cout<<"age :t"; cin>>p[i].age; cout<<"phon :t"; cin>>p[i].phon_num; cout<<"gender :t"; cin>>p[i].gender; getch(); } } void del() { system("cls"); cout<<"enter required out put numbert"<<endl; int n,a; cin>>n;
  • 7. a=0; char lname[20]; cout<<"enter last name to del record"<<endl; cin>>lname; for(int i=1;i<=n;i++){ if(strcmp(p[i].ful_name.last_name,lname)==0) { cout<<"t----------------------------------"<<endl; cout<<"tfirst name:t"<<p[i].ful_name.first_name=='0'; cout<<"tlast name :t"<<(p[i].ful_name.last_name)=='0'; cout<<"taddress :t"<<p[i].add=='0'; cout<<"tphone# :t"<<p[i].phon_num=='0'; cout<<"tage :t"<<p[i].age=='0'; cout<<"tgender :t"<<p[i].gender=='0'; cout<<"t----------------------------------"<<endl; }a++; cout<<"showing records:"<<a<<endl; getch(); } } void mdf() { system("cls"); int n; char lname[20]; cout<<"enter last name"<<endl; cin>>lname; //cout<<"search upto ....num?"<<endl; //cin>>n; for(int i=1;i<=9;i++) { if(strcmp(p[i].ful_name.last_name,lname)==0) { cout<<"enter 1st name:t"; cin>>p[i].ful_name.first_name; cout<<"enter last name:t"; cin>>p[i].ful_name.last_name; cout<<"address:t"; cin>>p[i].add; cout<<"age:t"; cin>>p[i].age; cout<<"phon:t";
  • 8. cin>>p[i].phon_num; cout<<"gender:t"; cin>>p[i].gender; } //getch(); } getch(); menu(); } void show1() { system("cls"); for(int i=1;i<=5;i++) { cout<<"t----------------------------------"<<endl; cout<<"tfirst name:tt"<<p[i].ful_name.first_name<<endl; cout<<"tlast name :tt"<<p[i].ful_name.first_name<<endl; cout<<"taddress :tt"<<p[i].add<<endl; cout<<"tage :tt"<<p[i].phon_num<<endl; cout<<"tgendr :tt"<<p[i].age<<endl; cout<<"tphon num :tt"<<p[i].gender<<endl; cout<<"t----------------------------------"<<endl; } //break; getch(); } void exit() { exit(0); } void hid() { char hide[t]; for (int t=0;t<10;t++) hide[t]=0; char nme[20]; char h; h=0; cout<<"Please Enter last name to hide:"; cin>>nme; for (int i=0;i<9;i++)
  • 9. { if (strcmp(p[i].ful_name.last_name,nme)==0) { hide[i]=1; } h=1; } cout<<"Hidden Successful"<<endl; if (h==0) cout<<"Record not Available"<<endl; getch(); menu(); } void srch() { system("cls"); char hide[10]; for (int t=0;t<10;t++) hide[t]=0; char nm[20]; char a; a=0; cout<<"nEnter Patient Last Name:"; cin>>nm; for (int i=0;i<9;i++) { if (strcmp(p[i].ful_name.last_name,nm)==0 && hide[i]==0) { cout<<"tt------------------------"; cout<<"ntt1 Record match!!!n"; cout<<"nttFirst Name :"; cout<<p[i].ful_name.first_name; cout<<"nttPatient Last Name :"; cout<<p[i].ful_name.last_name; cout<<"nttPatient Phone number:"; cout<<p[i].phon_num; cout<<"nttPatient Age :"; cout<<p[i].age; cout<<"nttPatient gender :"; cout<<p[i].gender<<endl; cout<<"tt------------------------n"; cout<<"nnn"; a=1; }
  • 10. } getch(); menu();} if (a==0) cout<<"nRecord not availablen"; void show() { system("cls"); char hide[10]; for (int t=0;t<10;t++) hide[t]=0; for (int i=0;i<9;i++) { if (hide[i]==0&& strlen(p[i].ful_name.last_name)>0) { cout<<"nRecord number t :"<<i+1; cout<<"nPatient First Namet :"; cout<<p[i].ful_name.first_name; cout<<"nPatient Last Namet :"; cout<<p[i].ful_name.last_name; cout<<"nPatient Phone numbert:"; cout<<p[i].phon_num; cout<<"nPatient Address t:"; cout<<p[i].add; cout<<"nPatient Age t:"; cout<<p[i].age; cout<<"nPatient gender t:"; cout<<p[i].gender; cout<<endl; } }getch(); } /*void del() { system("cls"); char name[22]; cout<<"enter 1st name to dell"<<endl; cin>>name; int a,b; for(int i=0;i<=9;i++) { a=strcmp(name,p[i].ful_name.first_name);