============================================
#include
#include
#include
#include
#include
#include
char menu1[6][30]={“Add”,”Show & Edit”,”Sort”,”Search”,”Delete”};
struct student{ char id[20];
char name[20];
char sex;
char birth[20];
char phonenum[20];
char room[20];
char department[50];
char fathername[50];
char fatherjob[50];
char mothername[50];
char motherjob[50];
char highschool[50];
char graduateyear[20];
char graduatelevel;
char placebirth[50];
char homeaddress[50];
}stu[50]={NULL},temp,temp1[50];
char move=’s’;
int y=2,x=3,n=0,countstudent=0;
void menu();
void menu2();
void add();
void show();
void edit(int );
void search1(int );
void showlist(int);
void listsearch(int,int);
void temp1show(int );
void load();
void del();
void sort();
void bordersearch(int ,int );
void border(int );
void search();
void main()
{ menu();
}
void menu()
{
clrscr();
load();
do
{ cancel:
clrscr();
switch(tolower(move))
{
case ‘s’: y++;
break;
case ‘w’: y–;
break;
case 13: if(y==0)
add();
if(y==1)
show();
if(y==4)
del();
if(y==2)
sort();
if(y==3)
search();
clrscr();
break;
}
if(y>=5)
y=0;
if(y<0 13:="" a="" an="" break="" can="" cancel="" case="" ch="" char="" clrscr="" countstu.txt.="" countstudent="" cprintf="" d="" daro1="" delete="" do="" else="" es="" exit="" fclose="" file="" first="" for="" fscanf="" goto="" gotoxy="" have="" i="" if="" int="" is="" menu1="" move="" o="" of="" open.="" open="" puts="" r="" red.="" run="" s="" selected="" students="%d”,countstudent);" switch="" t="" textcolor="" the="" this="" to="" tolower="" umber="" want="" we="" while="" x1="" x="" y="4;" you="">1)
x1=0;
if(x1<0 13:="" add="" added="" address:="" all="" an="" below="" birth:="" birth="" break="" c="" case="" ch="getch();" char="" clrscr="" countstudent="" cprintf="" d="" daro1="" daro="" department="" do="" edit="" else="" exit:="" exit="" fatherjob="" fathername="" fclose="" fflush="" file="" fill="" for="" fprintf="" getch="" gets="" gotoxy="" graduatelevel="" graduateyear="" highschool="" homeaddress="" i="" id="" if="" information="" int="" job="”);" level="”);" load="" motherjob="" mothername="" move="" n="" name="" nter="" number="”);" of="" open="" phonenum="" placebirth="" printf="" puts="" room="" s="" scanf="" school="”);" sex="" show="" stdin="" strcmp="" strcpy="" stu="" students:="" switch="" t="" tbirthday="”);" tdepartment="”);" textcolor="" tfather="" tgraduated="" the="" thome="" tid="”);" tmother="" tname="”);" tolower="" tphone="" tplace="" tplease="" troom="”);" tsex="”);" void="" w="" while="" x1="1;" x2="x2+5;" x="" y1="" y="" year="”);">=countstudent)
y=0;
if(y<0 13:="" ack="" an="" birth="" border="" break="" c="" case="" ch1="" char="" clrscr="" countstudent="" cprintf="" d="" daro1="" daro="" del="" department="" do="" else="" exit:="" exit="" fatherjob="" fathername="" fclose="" fflush="" file="" for="" fprintf="" fscanf="" gotoxy="" graduatelevel="" graduateyear="" highschool="" homeaddress="" i="" id="" if="" int="" is="" load="" menu2="" motherjob="" mothername="" move="" name="" open="" phonenum="" placebirth="" puts="" red.="" room="" s="" selected="" sex="" showlist="" stdin="" stu="" switch="" t="" textcolor="" the="" tolower="" void="" w="" while="" x1="1,y1=0" y1="" y="countstudent-1;">=countstudent)
y1=0;
if(y1<0 if="" x1="" y1="countstudent-1;">=7)
x1=0;
if(x1<0 13:="" ack="" ame="" birth="" border="" bordersearch="" break="" by="" c="" case="" ch1="" ch="" char="" clrscr="" cprintf="" d="" delete="" department="" do="" earch="" else="" enter="" epartment="" ex="" exit:="" fflush="" file="" for="" getch="" gets="" gotoxy="" hone="" i="" id="" if="" int="" irthday="" is="" listsearch="" load="" menu2="" n="" name="" nplease="" number="" o="" oom="" phone="" phonenum="" printf="" red.="" room="" s="" search1="" search:="" search="" selected="" sex="" showlist="" stdin="" strcmp="" stu="" switch="" temp1="" temp1show="" textcolor="" that="" the="" to="" tolower="" void="" w="" want="" while="" x1="6;" x="11,y=0,i;" y2="" y="" you="">=5)
y=0;
if(y<0 13:="" a-="" ack="" break="" by="" case="" ch="" char="" clrscr="" cprintf="" department="" do="" else="" file="" for="" gotoxy="" i="" id="" if="" int="" is="" name="" number="" ort="" phone="" red.="" ress="" room="" s="" search="" selected="" sort="" switch="" textcolor="" the="" to="" tolower="" void="" w="" while="" x="11,y=0;" y="">Z”);
gotoxy(2,22);
textcolor(YELLOW);
cprintf(“Press ‘Z’ to sort Z->A”);
choice=getch();
for(int i=0;i
{ temp=stu[i];
stu[i]=stu[j];
stu[j]=temp;
}
break;
case 1: if(strcmp(stu[i].name,stu[j].name)>0)
{ temp=stu[i];
stu[i]=stu[j];
stu[j]=temp;
}
break;
case 2: if(atoi(stu[i].phonenum)>atoi(stu[j].phonenum))
{ temp=stu[i];
stu[i]=stu[j];
stu[j]=temp;
}
break;
case 3: if(strcmp(stu[i].department,stu[j].department)>0)
{ temp=stu[i];
stu[i]=stu[j];
stu[j]=temp;
}
break;
case 4: if(strcmp(stu[i].room,stu[j].room)>0)
{ temp=stu[i];
stu[i]=stu[j];
stu[j]=temp;
}
break;
}
break;
case ‘z’: switch(y)
{ case 0: if(strcmp(stu[i].id,stu[j].id)<0 1:="" 2:="" 3:="" 4:="" an="" atoi="" been="" birth="" break="" c="" case="" clrscr="" completed.="" cprintf="" daro="" department="" exit="" fatherjob="" fathername="" fclose="" file="" for="" fprintf="" getch="" gotoxy="" graduatelevel="" graduateyear="" has="" highschool="" homeaddress="" i="" id="" if="" j="" motherjob="" mothername="" name="" open="" orted="" phonenum="" placebirth="" puts="" room="" s="" sex="" strcmp="" stu="" t="" temp="" textcolor="" y="">=5)
y=0;
if(y<0 13:="" ack="" address:="" birth:="" birth="" break="" c="" case="" ch="" char="" clrscr="" cprintf="" department="" do="" else="" exit:="" fatherjob="" fathername="" file="" for="" getch="" gotoxy="" graduatelevel="" graduateyear="" highschool="" homeaddress="" i="" id="" if="" int="" is="" job:="" level:="" motherjob="" mothername="" n="" name:="" name="" number:="" of="" phonenum="" placebirth="" r="" rbirthday:="" rdepartment:="" red.="" rfather="" rgraduated="" rhome="" rid:="" rmother="" rname:="" room="" rphone="" rplace="" rroom:="" rsex:="" s="" school:="" search1="" selected="" sex="" sort="" switch="" temp1="" textcolor="" the="" tolower="" transcribe="" view="" void="" w="" while="" x="" y1="" y2="" y="4;" year:="">=y2)
y1=0;
if(y1<0 13:="" ack="" address:="" ame:="" an="" ather="" birth:="" birth="" bordersearch="" break="" c="" case="" ch="" char="" clrscr="" cprintf="" d:="" daro="" department="" do="" edit="" else="" epartment:="" ex:="" exit="" fatherjob="" fathername="" fclose="" file="" for="" fprintf="" gets="" gotoxy="" graduatelevel="" graduateyear="" highschool="" homeaddress="" hone="" id="" if="" int="" irthday:="" is="" j="" job:="" k="" lace="" level:="" menu2="" motherjob="" mothername="" name:="" name="" number:="" of="" ome="" oom:="" open="" other="" phonenum="" placebirth="" puts="" raduated="" red.="" room="" s="" scanf="" school:="" selected="" sex="" stu="" switch="" t="" temp1show="" textcolor="" the="" void="" w="" while="" y1="" y2="" y="" year:="">=16)
y=0;
if(y<0 br="">y=15;
textcolor(WHITE);
gotoxy(10,1);
cprintf(“Transcribe view”);
for(i=0;i<16 br="" i="">{ if(i==y)
{ gotoxy(2,(i+1)*2);
textcolor(RED);
cprintf(“%s”,edit[i]);
}
else
{ gotoxy(2,(i+1)*2);
textcolor(WHITE);
cprintf(“%s”,edit[i]);
}
if(i==0)
cprintf(“%s”,stu[y1].id);
if(i==1)
cprintf(“%s”,stu[y1].name);
if(i==2)
cprintf(“%c”,stu[y1].sex);
if(i==3)
cprintf(“%s”,stu[y1].birth);
if(i==4)
cprintf(“%s”,stu[y1].phonenum);
if(i==5)
cprintf(“%s”,stu[y1].room);
if(i==6)
cprintf(“%s”,stu[y1].department);
if(i==7)
cprintf(“%s”,stu[y1].fathername);
if(i==8)
cprintf(“%s”,stu[y1].fatherjob);
if(i==9)
cprintf(“%s”,stu[y1].mothername);
if(i==10)
cprintf(“%s”,stu[y1].motherjob);
if(i==11)
cprintf(“%s”,stu[y1].highschool);
if(i==12)
cprintf(“%s”,stu[y1].graduateyear);
if(i==13)
cprintf(“%c”,stu[y1].graduatelevel);
if(i==14)
cprintf(“%s”,stu[y1].placebirth);
if(i==15)
cprintf(“%s”,stu[y1].homeaddress);
}
gotoxy(2,44);
textcolor(YELLOW);
cprintf(“ENTER=To rename”);
gotoxy(2,48);
textcolor(YELLOW);
cprintf(“NOTE: The Selected file is”);
textcolor(RED);
cprintf(” red.”);
gotoxy(2,46);
textcolor(YELLOW);
cprintf(“ESC=Back”);
ch=getch();
clrscr();
}while(ch!=27);
}
// Don’t forget to shared it to your friends ..!16>0>0>0>0>