SlideShare a Scribd company logo
SUBMITED BY
Bhanu Pratap Singh Shekhawat
Bachelor of Computer Application II YEAR
Dezyne E’cole College
www.dezyneecole.com
INFORMATION TECHNOLOGY
PROJECT REPORT
C++ PROGRAMMING
Online Exam
TOPIC
C++
Project Report
On
C++ Programming
At
Dezyne E’cole College
Ajmer
Submitted to
Dezyne E’cole College
Towards the
Partial Fulfillment on
Bachelor of Computer Application
By
Bhanu Pratap Singh Shekhawat
Dezyne E’cole College
106/10 Civil Line, Ajmer
Tel – 0145-2624679
Www.dezyneecole.com
2016
Acknowledgement
I Bhanu Pratap Singh Shekhawat, Student On Dezyne E’cole College,
An Extremely Grateful To Each And Every Individual. Who Has
Contributed. In Successful Completion Of My Project. I Express My
Gratitude Towards Dezyne E’cole College For Their. Guidance and
Contrast Supervision As Well As For Providing The Necessary
Information And Support Regarding The Completion Of Project
Thank You
1 | P a g e
Synopsis
This Project Is A Minor. Project Made, Based On The Practical Concept
Of C++ This Project Has Made Our Basic Practical Concepts On C++
Strong
2 | P a g e
3 | P a g e
4 | P a g e
5 | P a g e
6 | P a g e
#include<iostream.h>
#include<string.h>
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>
#include<dos.h>
#include<fstream.h>
class exam
{
public:
int qn;
char q[200];
char oa[60];
char ob[60];
char oc[60];
char od[60];
char ans[3];
};
class admin
{
public:
char id[60];
char password[60];
};
class student
{
public:
char id[60];
char password[60];
char fname[60];
char lname[60];
};
class result
{
public:
char id[60];
int ca;
char fname[60];
char lname[60];
};
class randomq
{
public:
7 | P a g e
int ran;
};
class gd
{
public:
int gdcq;
};
exam a;
admin b;
student c;
result e;
randomq ra;
gd gdv;
fstream f;
fstream y;
void main()
{
class use
{
public:
void white()
{
textcolor(0);
textbackground(7);
for(int i=0;i<2000;i++)
{
cprintf(" ");
}
}
/*Add Question and answer*/ /*final*/
void data()
{
white();
a.qn=0;
exam w;
f.open("exam.dat",ios::in);
while(f)
{
f.read((char *) &w,sizeof(w));
if(f==0)
{
8 | P a g e
break;
}
a.qn=w.qn;
}
f.close();
a.qn++;
gotoxy(30,3);
cout<<"Add Question & Answer";
gotoxy(20,5);
cout<<"Q."<<a.qn<<" ";
cin.getline(a.q,200);
gotoxy(20,7);
cout<<"A.";
cin.getline(a.oa,60);
gotoxy(50,7);
cout<<"B.";
cin.getline(a.ob,60);
gotoxy(20,9);
cout<<"C.";
cin.getline(a.oc,60);
gotoxy(50,9);
cout<<"D.";
cin.getline(a.od,60);
gotoxy(30,12);
cout<<"Ans.";
cin.getline(a.ans,3);
textcolor(4);
gotoxy(50,15);
cprintf("S");
gotoxy(56,15);
cprintf("C");
textcolor(BLACK);
gotoxy(51,15);
cprintf("ave");
gotoxy(57,15);
cout<<"ancel";
char n;
bk:
n=getch();
if(n=='S' || n=='s')
{
din();
goto en;
9 | P a g e
}
else if(n=='c' || n=='C')
{
goto en;
}
else
{
goto bk;
}
en:
}
/*Store Question and answer*/ /*final*/
void din()
{
f.open("exam.dat",ios::app | ios::out);
f.write((char *) &a,sizeof(a));
f.close();
}
/*Output Question and answer*/ /*final*/
void dout()
{
gotoxy(2,2);
cout<<"Questions :-";
for(int i=1;i<=79;i++)
{
gotoxy(i,3);
cout<<"-";
}
int cp=4;
exam w;
f.open("exam.dat",ios::in);
while(f)
{
f.read((char *) &w,sizeof(w));
if(f==0)
{
break;
}
// a.qn=w.qn;
// strcpy(a.q,w.q);
// strcpy(a.oa,w.oa);
// strcpy(a.ob,w.ob);
// strcpy(a.oc,w.oc);
10 | P a g e
// strcpy(a.od,w.od);
// strcpy(a.ans,w.ans);
gotoxy(4,cp);
cout<<w.qn<<" ";
int k=0,kk=7;
while(w.q[k]!='0')
{
gotoxy(kk,cp);
cout<<w.q[k];
if(kk>=65)
{
if(w.q[k]==32)
{
kk=7;
cp++;
}
}
k++;
kk++;
}
cp+=2;
if(cp>=17)
{
for(int i=1;i<=79;i++)
{
gotoxy(i,18);
cout<<"-";
}
gotoxy(5,20);
cout<<"Press any key to continue...";
getch();
clrscr();
gotoxy(2,2);
cout<<"Questions :-";
for(i=1;i<=79;i++)
{
gotoxy(i,3);
cout<<"-";
}
cp=4;
}
// cout<<w.oa;
// cout<<w.ob;
11 | P a g e
// cout<<w.oc;
// cout<<w.od;
// cout<<w.ans;
delay(200);
}
f.close();
getch();
}
/*Make student id*/ /*final*/
void studentid()
{
idl:
white();
gotoxy(30,3);
cout<<"Make Student Id";
gotoxy(25,5);
cout<<"Id : ";
cin.getline(c.id,60);
student w;
f.open("stu_id.dat",ios::in);
while(f)
{
f.read((char *) &w,sizeof(w));
if(strcmp(c.id,w.id)==0)
{
cout<<"nId is already exist";
delay(2000);
clrscr();
goto idl;
}
if(f==0)
{
break;
}
}
f.close();
gotoxy(19,7);
cout<<"Password : "; //for input password
int sic=-1;
while(c.password[sic]!=13)
{
sic++;
c.password[sic]=getch();
12 | P a g e
cout<<"*";
if(c.password[sic]==8)
{
cout<<"b bb b";
sic-=2;
}
}
c.password[sic]='0';
// cin.getline(c.password,60);
gotoxy(17,9);
cout<<"First name : ";
cin.getline(c.fname,60);
gotoxy(18,11);
cout<<"Last name : ";
cin.getline(c.lname,60);
textcolor(4);
gotoxy(32,15);
cprintf("S");
gotoxy(38,15);
cprintf("C");
textcolor(0);
gotoxy(33,15);
cprintf("ave");
gotoxy(39,15);
cout<<"ancel";
char n;
cl:
n=getch();
if(n=='S' || n=='s')
{
studentdin();
goto dn;
}
else if(n=='C' || n=='c')
{
goto dn;
}
else
{
goto cl;
}
dn:
}
13 | P a g e
/*Store student id*/ /*final*/
void studentdin()
{
f.open("stu_id.dat",ios::app | ios::out);
f.write((char *) &c,sizeof(c));
f.close();
}
/*Output student id*/ /*final*/
void studentdout()
{
white();
student w;
f.open("stu_id.dat",ios::in);
while(f)
{
f.read((char *) &w,sizeof(w));
if(f==0)
{
break;
}
// strcpy(c.id,w.id);
// strcpy(c.password,w.password);
// strcpy(c.fname,w.fname);
// strcpy(c.lname,w.lname);
cout<<"t"<<w.id<<endl;
cout<<"t"<<w.password<<endl;
cout<<"t"<<w.fname<<endl;
cout<<"t"<<w.lname<<endl;
delay(1000);
}
f.close();
}
/*Make admin data*/ /*Final*/
void adminid()
{
white();
gotoxy(30,3);
cout<<"Make admin Id";
gotoxy(25,5);
cout<<"Enter id : ";
cin.getline(b.id,60);
gotoxy(19,7);
cout<<"Enter password : ";
14 | P a g e
cin.getline(b.password,60);
textcolor(4);
gotoxy(30,10);
cprintf("S");
gotoxy(36,10);
cprintf("C");
textcolor(0);
gotoxy(31,10);
cprintf("ave");
gotoxy(37,10);
cout<<"ancel";
char n;
wi:
n=getch();
if(n=='S' || n=='s')
{
admindin();
goto el;
}
else if(n=='C' || n=='c')
{
goto el;
}
else
{
goto wi;
}
el:
}
/*Store admin id*/ /*Final*/
void admindin()
{
f.open("admin.dat",ios::app | ios::out);
f.write((char *) &b,sizeof(b));
f.close();
}
/*Output admin id*/ /*Final*/
void admindout()
{
white();
admin w;
f.open("admin.dat",ios::in);
while(f)
15 | P a g e
{
f.read((char *) &w, sizeof(w));
if(f==0)
{
break;
}
// strcpy(b.id,w.id);
// strcpy(b.password,w.password);
cout<<w.id<<endl;
cout<<w.password<<endl;
delay(1000);
}
f.close();
}
/*Change admin id*/ /*Final*/
void changeadminid()
{
nmp:
white();
char oid[60],nid[60];
gotoxy(30,4);
cout<<"Change admin Id : ";
gotoxy(25,6);
cout<<"Old id : ";
cin.getline(oid,60);
admin w;
f.open("admin.dat",ios::in);
while(f)
{
f.read((char *) &w,sizeof(w));
if(f==0)
{
break;
}
}
f.close();
if(strcmp(oid,w.id)==0)
{
gotoxy(25,8);
cout<<"New id : ";
cin.getline(nid,60);
textcolor(4);
gotoxy(30,12);
16 | P a g e
cprintf("S");
gotoxy(36,12);
cprintf("C");
textcolor(0);
gotoxy(31,12);
cprintf("ave");
gotoxy(37,12);
cout<<"ancel";
char n;
wl:
n=getch();
if(n=='S' || n=='s')
{
admin w;
y.open("tadmin.dat",ios::app | ios::out);
f.open("admin.dat",ios::in);
while(f)
{
f.read((char *) &w, sizeof(w));
if(f==0)
{
break;
}
if(strcmp(oid,w.id)==0)
{
strcpy(w.id,nid);
y.write((char *) &w, sizeof(w));
}
else
{
y.write((char *) &w, sizeof(w));
}
}
y.close();
f.close();
remove("admin.dat");
rename("tadmin.dat","admin.dat");
goto cl;
}
else if(n=='C' || n=='c')
{
goto cl;
}
17 | P a g e
else
{
goto wl;
}
}
else
{
gotoxy(30,11);
cout<<"Id not match";
delay(1600);
clrscr();
goto nmp;
}
cl:
}
/*Change admin password*/ /*Final*/
void changeadminpass()
{
nmp:
white();
char opass[60],npass[60],cpass[60];
gotoxy(30,4);
cout<<"Change admin password";
gotoxy(25,6);
cout<<"Old password : "; //for input password
int sic=-1;
while(opass[sic]!=13)
{
sic++;
opass[sic]=getch();
cout<<"*";
if(opass[sic]==8)
{
cout<<"b bb b";
sic-=2;
}
}
opass[sic]='0';
// cin.getline(opass,60);
admin w;
f.open("admin.dat",ios::in);
while(f)
{
18 | P a g e
f.read((char *) &w, sizeof(w));
if(f==0)
{
break;
}
}
f.close();
if(strcmp(opass,w.password)==0)
{
gotoxy(25,8);
cout<<"New password : "; //for input password
int sic=-1;
while(npass[sic]!=13)
{
sic++;
npass[sic]=getch();
cout<<"*";
if(npass[sic]==8)
{
cout<<"b bb b";
sic-=2;
}
}
npass[sic]='0';
// cin.getline(npass,60);
gotoxy(21,10);
cout<<"Confirm password : ";
gotoxy(35,12); //for input password
sic=-1;
while(cpass[sic]!=13)
{
sic++;
cpass[sic]=getch();
cout<<"*";
if(cpass[sic]==8)
{
cout<<"b bb b";
sic-=2;
}
}
cpass[sic]='0';
// cin.getline(cpass,60);
if(strcmp(npass,cpass)==0)
19 | P a g e
{
textcolor(4);
gotoxy(35,14);
cprintf("S");
gotoxy(41,14);
cprintf("C");
textcolor(0);
gotoxy(36,14);
cprintf("ave");
gotoxy(42,14);
cout<<"ancel";
char n;
wl:
n=getch();
if(n=='S' || n=='s')
{
admin w;
y.open("tadmin.dat",ios::app | ios::out);
f.open("admin.dat",ios::in);
while(f)
{
f.read((char *) &w, sizeof(w));
if(f==0)
{
break;
}
if(strcmp(opass,w.password)==0)
{
strcpy(w.password,npass);
y.write((char *) &w, sizeof(w));
}
else
{
y.write((char *) &w, sizeof(w));
}
}
y.close();
f.close();
remove("admin.dat");
rename("tadmin.dat","admin.dat");
goto cl;
}
else if(n=='C' || n=='c')
20 | P a g e
{
goto cl;
}
else
{
goto wl;
}
}
else
{
gotoxy(30,13);
cout<<"Password not match";
delay(1600);
clrscr();
goto nmp;
}
}
else
{
gotoxy(30,13);
cout<<"Password not match";
delay(1600);
clrscr();
goto nmp;
}
cl:
}
/*Student log in*/ /*Final*/
void studentlog()
{
white();
gotoxy(30,4);
cout<<"Log in";
gotoxy(25,6);
cout<<"Id : ";
cin.getline(c.id,60);
gotoxy(19,8);
cout<<"Password : "; //for input password
int sic=-1;
while(c.password[sic]!=13)
{
sic++;
c.password[sic]=getch();
21 | P a g e
cout<<"*";
if(c.password[sic]==8)
{
cout<<"b bb b";
sic-=2;
}
}
c.password[sic]='0';
// cin.getline(c.password,60);
textcolor(4);
gotoxy(30,12);
cprintf("L");
gotoxy(39,12);
cprintf("C");
textcolor(0);
gotoxy(31,12);
cprintf("ogin");
gotoxy(40,12);
cout<<"ancel";
char n;
int g=0;
wi:
n=getch();
if(n=='L' || n=='l')
{
student w;
f.open("stu_id.dat",ios::in);
while(f)
{
f.read((char *) &w, sizeof(w));
if(strcmp(c.id,w.id)==0 &&
strcmp(c.password,w.password)==0)
{
clrscr();
strcpy(c.id,w.id);
strcpy(c.password,w.password);
strcpy(c.fname,w.fname);
strcpy(c.lname,w.lname);
g++;
break;
}
g=0;
if(f==0)
22 | P a g e
{
break;
}
}
f.close();
if(g==0 || g=='0')
{
gotoxy(30,10);
cout<<"Id not valid";
delay(1500);
main();
}
goto en;
}
else if(n=='C' || n=='c')
{
main();
}
else
{
goto wi;
}
en:
}
/*Student option*/ /*Final*/
void studentopp()
{
white();
gotoxy(30,4);
cout<<"Welcome "<<c.fname;
gotoxy(38,5);
cout<<c.lname;
gotoxy(30,18);
cout<<"Choose your option";
gotoxy(28,7);
cout<<"1. Test"; /*Right*/
gotoxy(28,9);
cout<<"2. View result";
gotoxy(28,11);
cout<<"3. Change Id";
gotoxy(28,13);
cout<<"4. Change Password";
gotoxy(28,15);
23 | P a g e
cout<<"5. Log out";
}
/*Admin panel*/ /*Final*/
void adminopp()
{
white();
gotoxy(30,4);
cout<<"Choose your option";
gotoxy(28,6);
cout<<"1. Add Question and answer"; /*right*/
gotoxy(28,8);
cout<<"2. Change admin Id"; /*right*/
gotoxy(28,10);
cout<<"3. Change admin password"; /*right*/
gotoxy(28,12);
cout<<"4. Make student Id"; /*right*/
gotoxy(28,14);
cout<<"5. View student result"; /*Right*/
gotoxy(28,16);
cout<<"6. Student modification"; /*Right*/
gotoxy(28,18);
cout<<"7. View question"; /*Right*/
gotoxy(28,20);
cout<<"8. Delete Questions"; /*Right*/
gotoxy(28,22);
cout<<"9. Log out";
}
/*Modify student detail*/ /*final*/
void studentmodify()
{
white();
gotoxy(30,4);
cout<<"Choose your option";
gotoxy(28,6);
cout<<"1. Id"; /*Right*/
gotoxy(28,8);
cout<<"2. Password"; /*Right*/
gotoxy(28,10);
cout<<"3. Back";
}
/*Change student id*/ /*Final*/
void changestudentid()
{
24 | P a g e
nmp:
white();
char oid[60],nid[60];
int h=0;
gotoxy(30,4);
cout<<"Change Student Id : ";
gotoxy(25,6);
cout<<"Old id : ";
cin.getline(oid,60);
student w;
f.open("stu_id.dat",ios::in);
while(f)
{
f.read((char *) &w, sizeof(w));
if(f==0)
{
break;
}
if(strcmp(oid,w.id)==0)
{
h++;
break;
}
}
f.close();
if(h>0)
{
gotoxy(25,8);
cout<<"New id : ";
cin.getline(nid,60);
textcolor(4);
gotoxy(30,12);
cprintf("S");
gotoxy(36,12);
cprintf("C");
textcolor(0);
gotoxy(31,12);
cprintf("ave");
gotoxy(37,12);
cout<<"ancel";
char n;
wl:
n=getch();
25 | P a g e
if(n=='S' || n=='s')
{
student w;
y.open("tstu_id.dat",ios::app | ios::out);
f.open("stu_id.dat",ios::in);
while(f)
{
f.read((char *) &w, sizeof(w));
if(f==0)
{
break;
}
if(strcmp(oid,w.id)==0 &&
strcmp(c.id,w.id)==0 && strcmp(c.password,w.password)==0)
{
strcpy(w.id,nid);
y.write((char *) &w, sizeof(w));
}
else
{
y.write((char *) &w, sizeof(w));
}
}
y.close();
f.close();
remove("stu_id.dat");
rename("tstu_id.dat","stu_id.dat");
goto cl;
}
else if(n=='C' || n=='c')
{
goto cl;
}
else
{
goto wl;
}
}
else
{
gotoxy(30,11);
cout<<"Id not match";
delay(1600);
26 | P a g e
clrscr();
goto cl;
}
cl:
}
/*Change student password*/ /*Final*/
void changestudentpass()
{
nmp:
white();
char opass[60],npass[60],cpass[60];
int h=0;
gotoxy(30,4);
cout<<"Change Student password";
gotoxy(25,6);
cout<<"Old password : ";
int sic=-1;
while(opass[sic]!=13)
{
sic++;
opass[sic]=getch();
cout<<"*";
if(opass[sic]==8)
{
cout<<"b bb b";
sic-=2;
}
}
opass[sic]='0';
// cin.getline(opass,60);
student w;
f.open("stu_id.dat",ios::in);
while(f)
{
f.read((char *) &w, sizeof(w));
if(f==0)
{
break;
}
if(strcmp(opass,w.password)==0)
{
h++;
break;
27 | P a g e
}
}
f.close();
if(h>0)
{
gotoxy(25,8);
cout<<"New password : ";
int sic=-1;
while(npass[sic]!=13)
{
sic++;
npass[sic]=getch();
cout<<"*";
if(npass[sic]==8)
{
cout<<"b bb b";
sic-=2;
}
}
npass[sic]='0';
// cin.getline(npass,60);
gotoxy(21,10);
cout<<"Confirm password : ";
sic=-1;
while(cpass[sic]!=13)
{
sic++;
cpass[sic]=getch();
cout<<"*";
if(cpass[sic]==8)
{
cout<<"b bb b";
sic-=2;
}
}
cpass[sic]='0';
// cin.getline(cpass,60);
if(strcmp(npass,cpass)==0)
{
textcolor(4);
gotoxy(35,14);
cprintf("S");
gotoxy(41,14);
28 | P a g e
cprintf("C");
textcolor(0);
gotoxy(36,14);
cprintf("ave");
gotoxy(42,14);
cout<<"ancel";
char n;
wl:
n=getch();
if(n=='S' || n=='s')
{
student w;
y.open("tstu_id.dat",ios::app | ios::out);
f.open("stu_id.dat",ios::in);
while(f)
{
f.read((char *) &w, sizeof(w));
if(f==0)
{
break;
}
if(strcmp(opass,w.password)==0 &&
strcmp(c.id,w.id)==0 && strcmp(c.password,w.password)==0)
{
strcpy(w.password,npass);
y.write((char *) &w, sizeof(w));
}
else
{
y.write((char *) &w, sizeof(w));
}
}
y.close();
f.close();
remove("stu_id.dat");
rename("tstu_id.dat","stu_id.dat");
goto cl;
}
else if(n=='C' || n=='c')
{
goto cl;
}
else
29 | P a g e
{
goto wl;
}
}
else
{
gotoxy(30,13);
cout<<"Password not match";
delay(1600);
clrscr();
goto nmp;
}
}
else
{
gotoxy(30,13);
cout<<"Password not match";
delay(1600);
clrscr();
goto nmp;
}
cl:
}
/*Clock*/ /*Final*/
void clock()
{
int m,s,ms;
m=s=ms=0;
cout<<endl<<"t";
for(;1;)
{
clrscr();
cout<<m<<":"<<s<<":"<<ms;
if(m==10)
{
break;
}
delay(10);
ms++;
if(ms==100)
{
s++;
ms=0;
30 | P a g e
if(s==60)
{
s=0;
m++;
}
}
}
}
/*Test question*/ /*Final*/
void question()
{
white();
gdv.gdcq=0;
exam wa;
f.open("exam.dat",ios::in);
while(f)
{
f.read((char *) &wa, sizeof(wa));
if(wa.qn==5)
{
gdv.gdcq++;
break;
}
if(f==0)
{
break;
}
}
f.close();
if(gdv.gdcq==0)
{
gotoxy(25,5);
cout<<"Not Edited five Question";
return;
}
randomq req;
y.open("random.dat",ios::in);
while(y)
{
y.read((char *) &req,sizeof(req));
if(y==0)
{
break;
31 | P a g e
}
ra.ran=req.ran;
}
y.close();
if(ra.ran>=1 && ra.ran<=800)
{
goto jum;
}
else
{
ra.ran=1;
}
jum:
int Qn=0;
char as[200];
int anc=0;
int ncoun=0;
int m,s,ms;
m=s=ms=0;
clrscr();
exam w;
f.open("exam.dat",ios::in);
while(f)
{
back:
f.read((char *) &w, sizeof(w));
if(ncoun==0 && ra.ran!=w.qn)
{
goto back;
}
ncoun++;
if(Qn==5)
{
ra.ran=w.qn;
break;
}
if(Qn!=5 && f==0)
{
f.close();
f.open("exam.dat",ios::in);
ra.ran=1;
goto back;
}
32 | P a g e
clrscr();
Qn++;
lb:
clrscr();
for(;1;) //
{
gotoxy(25,6);
cout<<"Q "<<Qn<<" ";
int k=0,kk=30,kkc=6;
while(w.q[k]!='0')
{
gotoxy(kk,kkc);
cout<<w.q[k];
if(kk>=65)
{
if(w.q[k]==32)
{
kk=30;
kkc++;
}
}
k++;
kk++;
}
gotoxy(25,9);
cout<<"A. "<<w.oa;
gotoxy(45,9);
cout<<"B. "<<w.ob;
gotoxy(25,11);
cout<<"C. "<<w.oc;
gotoxy(45,11);
cout<<"D. "<<w.od;
gotoxy(30,13);
cout<<"Ans. ";
if(s>=10 && s<=60)
{
gotoxy(68,3);
cout<<"0"<<m<<":"<<s<<":"<<ms;
}
else
{
gotoxy(68,3);
cout<<"0"<<m<<":0"<<s<<":"<<ms;
33 | P a g e
}
if(m==3)
{
break;
}
delay(10);
ms++;
if(ms==100)
{
s++;
ms=0;
if(s==60)
{
s=0;
m++;
}
}
if(kbhit())
{
gotoxy(35,13);
as[0]=getch();
as[1]='0';
if(as[1]!='0')
{
goto lb;
}
if(as[0]=='a' || as[0]=='A')
{
if(as[0]==w.ans[0] ||
(as[0]+32)==w.ans[0] || (as[0]-32)==w.ans[0])
{
anc++;
clrscr();
goto en;
}
goto en;
}
else if(as[0]=='b' || as[0]=='B')
{
if(as[0]==w.ans[0] ||
(as[0]+32)==w.ans[0] || (as[0]-32)==w.ans[0])
{
anc++;
34 | P a g e
clrscr();
goto en;
}
goto en;
}
else if(as[0]=='c' || as[0]=='C')
{
if(as[0]==w.ans[0] ||
(as[0]+32)==w.ans[0] || (as[0]-32)==w.ans[0])
{
anc++;
clrscr();
goto en;
}
goto en;
}
else if(as[0]=='d' || as[0]=='D')
{
if(as[0]==w.ans[0] ||
(as[0]+32)==w.ans[0] || (as[0]-32)==w.ans[0])
{
anc++;
clrscr();
goto en;
}
goto en;
}
else
{
clrscr();
goto lb;
}
}
} //en
en:
if(m==3)
{
break;
}
clrscr();
}
f.close();
clrscr();
35 | P a g e
remove("random.dat");
y.open("random.dat",ios::app | ios::out);
y.write((char *) &ra,sizeof(ra));
y.close();
strcpy(e.id,c.id);
e.ca=anc;
strcpy(e.fname,c.fname);
strcpy(e.lname,c.lname);
result z;
y.open("result.dat",ios::in);
while(y)
{
y.read((char *) &z,sizeof(z));
if(strcmp(z.id,e.id)!=0)
{
f.open("tresult.dat",ios::app | ios::out);
f.write((char *) &z,sizeof(z));
f.close();
}
}
y.close();
remove("result.dat");
rename("tresult.dat","result.dat");
f.open("result.dat",ios::app | ios::out);
f.write((char *) &e,sizeof(e));
f.close();
}
/*Test result*/ /*Final*/
void testresult()
{
white();
int re=0;
result z;
y.open("result.dat",ios::in);
while(y)
{
y.read((char *) &z,sizeof(z));
if(strcmp(z.id,c.id)==0)
{
re=1;
break;
}
}
36 | P a g e
y.close();
if(re==0)
{
gotoxy(25,4);
cout<<"Result not available";
getch();
return;
}
clrscr();
for(int i=2;i<=16;i++)
{
for(int j=25;j<=55;j++)
{
if(i==2 || i==16 || i==6 || i==14)
{
gotoxy(j,i);
cout<<"-";
}
if(i>=3 && i<=15)
{
if(j==25 || j==55)
{
gotoxy(j,i);
cout<<"|";
}
}
if(i>=7 && i<=13)
{
if(j==43)
{
gotoxy(j,i);
cout<<"|";
}
}
}
}
gotoxy(28,3);
cout<<"Id : "<<c.id;
gotoxy(27,5);
cout<<"Name : "<<c.fname;
// cout<<c.lname;
gotoxy(27,7);
cout<<"Total Question";
37 | P a g e
gotoxy(48,7);
cout<<"5";
gotoxy(27,9);
cout<<"Correct answer";
gotoxy(48,9);
cout<<z.ca;
gotoxy(27,11);
cout<<"Total Marks";
gotoxy(48,11);
cout<<"50";
gotoxy(27,13);
cout<<"Obtain Marks";
gotoxy(48,13);
cout<<(z.ca*10);
gotoxy(27,15);
cout<<"Result : ";
if((z.ca*10)>=30)
{
cout<<"Pass";
}
else
{
textcolor(4);
cprintf("Fail");
}
gotoxy(27,18);
cout<<"Press any key to Back.....";
getch();
}
/*Front screen*//*Final*/
void front()
{
white();
gotoxy(30,4);
cout<<"Online Exam";
gotoxy(27,7);
cout<<"1. Student Panel";
gotoxy(27,9);
cout<<"2. Administrator Panel";
gotoxy(27,11);
cout<<"3. Exit";
}
/*admin login*//*final*/
38 | P a g e
void adminlog()
{
white();
gotoxy(30,4);
cout<<"Log in";
gotoxy(25,6);
cout<<"Id : ";
cin.getline(b.id,60);
gotoxy(19,8);
cout<<"Password : ";
int sic=-1;
while(b.password[sic]!=13)
{
sic++;
b.password[sic]=getch();
cout<<"*";
if(b.password[sic]==8)
{
cout<<"b bb b";
sic-=2;
}
}
b.password[sic]='0';
// cin.getline(b.password,60);
textcolor(4);
gotoxy(30,12);
cprintf("L");
gotoxy(39,12);
cprintf("C");
textcolor(0);
gotoxy(31,12);
cprintf("ogin");
gotoxy(40,12);
cout<<"ancel";
char n;
int g=0;
wi:
n=getch();
if(n=='L' || n=='l')
{
admin w;
f.open("admin.dat",ios::in);
while(f)
39 | P a g e
{
f.read((char *) &w, sizeof(w));
if(strcmp(b.id,w.id)==0 &&
strcmp(b.password,w.password)==0)
{
clrscr();
gotoxy(30,4);
cout<<"Welcome Admin";
g++;
break;
}
g=0;
if(f==0)
{
break;
}
}
f.close();
if(g==0 || g=='0')
{
gotoxy(30,10);
cout<<"Id not valid";
delay(1500);
main();
}
goto en;
}
else if(n=='C' || n=='c')
{
main();
}
else
{
goto wi;
}
en:
}
/*Delete question*//*Final*/
void dele()
{
bkl:
white();
int delq;
40 | P a g e
gotoxy(25,3);
cout<<"Enter Question no. you want to delete";
gotoxy(25,5);
cout<<"Enter : ";
cin>>delq;
int cou=0;
exam w;
f.open("exam.dat",ios::in);
while(f)
{
f.read((char *) &w,sizeof(w));
if(f==0)
{
break;
}
if(delq==w.qn)
{
cou=1;
break;
}
}
f.close();
if(cou==0)
{
gotoxy(25,9);
cout<<"Question not available";
getch();
clrscr();
goto bkl;
}
textcolor(4);
gotoxy(30,7);
cprintf("D");
gotoxy(40,7);
cprintf("C");
textcolor(0);
gotoxy(31,7);
cprintf("elete");
gotoxy(41,7);
cout<<"ancel";
char n;
bk:
n=getch();
41 | P a g e
if(n=='d' || n=='D')
{
exam w;
f.open("exam.dat",ios::in);
y.open("texam.dat",ios::app | ios::out);
while(f)
{
f.read((char *) &w,sizeof(w));
if(f==0)
{
break;
}
if(delq!=w.qn)
{
y.write((char *) &w,sizeof(w));
}
}
y.close();
f.close();
remove("exam.dat");
rename("texam.dat","exam.dat");
cou=1;
f.open("exam.dat",ios::in);
y.open("texam.dat",ios::app | ios::out);
while(f)
{
f.read((char *) &w,sizeof(w));
if(f==0)
{
break;
}
w.qn=cou;
y.write((char *) &w,sizeof(w));
cou++;
}
y.close();
f.close();
remove("exam.dat");
rename("texam.dat","exam.dat");
goto en;
}
else if(n=='c' || n=='C')
{
42 | P a g e
goto en;
}
else
{
goto bk;
}
en:
}
/*Ready to test*/ /*Final*/
void ready()
{
white();
char re1[50]="You have three minutes to complete your test";
int i=0;
gotoxy(21,4);
while(re1[i]!='0')
{
delay(50);
cout<<re1[i];
i++;
}
char re[15]="Ready";
i=0;
gotoxy(37,6);
while(re[i]!='0')
{
delay(50);
cout<<re[i];
i++;
}
textcolor(4);
gotoxy(33,9);
cprintf("Y");
gotoxy(43,9);
cprintf("N");
textcolor(0);
gotoxy(34,9);
cprintf("es");
gotoxy(44,9);
cout<<"o";
char n;
bk:
n=getch();
43 | P a g e
if(n=='y' || n=='Y')
{
gdv.gdcq=1;
goto en;
}
else if(n=='n' || n=='N')
{
gdv.gdcq=0;
goto en;
}
else
{
goto bk;
}
en:
}
/*Result process*//*Final*/
void process()
{
white();
char wt[50]="Result will be process";
int i=0;
gotoxy(30,6);
while(wt[i]!='0')
{
delay(50);
cout<<wt[i];
i++;
}
char wt1[20]="Wait few second";
i=0;
gotoxy(34,7);
while(wt1[i]!='0')
{
delay(50);
cout<<wt1[i];
i++;
}
for(i=1;i<=12;i++)
{
delay(600);
if(i==4 || i==7 || i==10)
{
44 | P a g e
cout<<"b bb b";
}
else
{
cout<<".";
}
}
}
};
}
45 | P a g e
THANK YOU

More Related Content

Similar to Bhanu Pratap Singh Shekhawat, BCA Third Year

Kajal Gaharwal , BCA Third Year
Kajal Gaharwal , BCA Third YearKajal Gaharwal , BCA Third Year
Kajal Gaharwal , BCA Third Year
Dezyneecole
 
Rounit Mathur , BCA Third Year
Rounit Mathur , BCA Third YearRounit Mathur , BCA Third Year
Rounit Mathur , BCA Third Year
Dezyneecole
 
Bhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third YearBhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third Year
Dezyneecole
 
Vinita Vaishnav , BCA Third Year
Vinita Vaishnav , BCA Third YearVinita Vaishnav , BCA Third Year
Vinita Vaishnav , BCA Third Year
Dezyneecole
 
Hardik Jadam , BCA Third Year
Hardik Jadam , BCA Third YearHardik Jadam , BCA Third Year
Hardik Jadam , BCA Third Year
dezyneecole
 
Pooja Sharma , BCA Third Year
Pooja Sharma , BCA Third YearPooja Sharma , BCA Third Year
Pooja Sharma , BCA Third Year
Dezyneecole
 
Shikh Mohammad Usman Haidar , BCA Third Year
Shikh Mohammad Usman Haidar , BCA Third YearShikh Mohammad Usman Haidar , BCA Third Year
Shikh Mohammad Usman Haidar , BCA Third Year
Dezyneecole
 
Shivani Chouhan , BCA Third Year
Shivani Chouhan , BCA Third YearShivani Chouhan , BCA Third Year
Shivani Chouhan , BCA Third Year
Dezyneecole
 
Gaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third YearGaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third Year
dezyneecole
 
Deepika Mittal , BCA Third Year
Deepika Mittal , BCA Third YearDeepika Mittal , BCA Third Year
Deepika Mittal , BCA Third Year
dezyneecole
 
Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Year
dezyneecole
 
Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Year
dezyneecole
 
Deepika Mittal , BCA Third Year
Deepika Mittal , BCA Third YearDeepika Mittal , BCA Third Year
Deepika Mittal , BCA Third Year
dezyneecole
 
Gaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third YearGaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third Year
dezyneecole
 
Pads lab manual final
Pads lab manual finalPads lab manual final
Pads lab manual final
AhalyaR
 
CPP Quiz
CPP QuizCPP Quiz
CPP Quiz
Felix Morgner
 
Hardik Jadam , BCA Third Year
Hardik Jadam , BCA Third YearHardik Jadam , BCA Third Year
Hardik Jadam , BCA Third Year
Dezyneecole
 
Vinita Vaishnav , BCA Third Year
Vinita Vaishnav , BCA Third YearVinita Vaishnav , BCA Third Year
Vinita Vaishnav , BCA Third Year
Dezyneecole
 
Ronak Kachhawa , BCA Third Year
Ronak Kachhawa , BCA Third YearRonak Kachhawa , BCA Third Year
Ronak Kachhawa , BCA Third Year
Dezyneecole
 
Shivani Chouhan , BCA Third Year
Shivani Chouhan , BCA Third YearShivani Chouhan , BCA Third Year
Shivani Chouhan , BCA Third Year
Dezyneecole
 

Similar to Bhanu Pratap Singh Shekhawat, BCA Third Year (20)

Kajal Gaharwal , BCA Third Year
Kajal Gaharwal , BCA Third YearKajal Gaharwal , BCA Third Year
Kajal Gaharwal , BCA Third Year
 
Rounit Mathur , BCA Third Year
Rounit Mathur , BCA Third YearRounit Mathur , BCA Third Year
Rounit Mathur , BCA Third Year
 
Bhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third YearBhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third Year
 
Vinita Vaishnav , BCA Third Year
Vinita Vaishnav , BCA Third YearVinita Vaishnav , BCA Third Year
Vinita Vaishnav , BCA Third Year
 
Hardik Jadam , BCA Third Year
Hardik Jadam , BCA Third YearHardik Jadam , BCA Third Year
Hardik Jadam , BCA Third Year
 
Pooja Sharma , BCA Third Year
Pooja Sharma , BCA Third YearPooja Sharma , BCA Third Year
Pooja Sharma , BCA Third Year
 
Shikh Mohammad Usman Haidar , BCA Third Year
Shikh Mohammad Usman Haidar , BCA Third YearShikh Mohammad Usman Haidar , BCA Third Year
Shikh Mohammad Usman Haidar , BCA Third Year
 
Shivani Chouhan , BCA Third Year
Shivani Chouhan , BCA Third YearShivani Chouhan , BCA Third Year
Shivani Chouhan , BCA Third Year
 
Gaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third YearGaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third Year
 
Deepika Mittal , BCA Third Year
Deepika Mittal , BCA Third YearDeepika Mittal , BCA Third Year
Deepika Mittal , BCA Third Year
 
Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Year
 
Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Year
 
Deepika Mittal , BCA Third Year
Deepika Mittal , BCA Third YearDeepika Mittal , BCA Third Year
Deepika Mittal , BCA Third Year
 
Gaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third YearGaurav Jatav , BCA Third Year
Gaurav Jatav , BCA Third Year
 
Pads lab manual final
Pads lab manual finalPads lab manual final
Pads lab manual final
 
CPP Quiz
CPP QuizCPP Quiz
CPP Quiz
 
Hardik Jadam , BCA Third Year
Hardik Jadam , BCA Third YearHardik Jadam , BCA Third Year
Hardik Jadam , BCA Third Year
 
Vinita Vaishnav , BCA Third Year
Vinita Vaishnav , BCA Third YearVinita Vaishnav , BCA Third Year
Vinita Vaishnav , BCA Third Year
 
Ronak Kachhawa , BCA Third Year
Ronak Kachhawa , BCA Third YearRonak Kachhawa , BCA Third Year
Ronak Kachhawa , BCA Third Year
 
Shivani Chouhan , BCA Third Year
Shivani Chouhan , BCA Third YearShivani Chouhan , BCA Third Year
Shivani Chouhan , BCA Third Year
 

More from Dezyneecole

Pratibha Kumari, Diploma Fashion Design First Year, (Basic Pattern Developmen...
Pratibha Kumari, Diploma Fashion Design First Year, (Basic Pattern Developmen...Pratibha Kumari, Diploma Fashion Design First Year, (Basic Pattern Developmen...
Pratibha Kumari, Diploma Fashion Design First Year, (Basic Pattern Developmen...
Dezyneecole
 
Shaily Goyar, Diploma Fashion Design First Year, (Basic Pattern Development P...
Shaily Goyar, Diploma Fashion Design First Year, (Basic Pattern Development P...Shaily Goyar, Diploma Fashion Design First Year, (Basic Pattern Development P...
Shaily Goyar, Diploma Fashion Design First Year, (Basic Pattern Development P...
Dezyneecole
 
Shaily Goyar, Diploma Fashion Design First Year, (Fashion illustration for Fa...
Shaily Goyar, Diploma Fashion Design First Year, (Fashion illustration for Fa...Shaily Goyar, Diploma Fashion Design First Year, (Fashion illustration for Fa...
Shaily Goyar, Diploma Fashion Design First Year, (Fashion illustration for Fa...
Dezyneecole
 
Shaily Goyar, Diploma Fashion Design First Year, (Embroidery Project)
Shaily Goyar, Diploma Fashion Design First Year, (Embroidery Project)Shaily Goyar, Diploma Fashion Design First Year, (Embroidery Project)
Shaily Goyar, Diploma Fashion Design First Year, (Embroidery Project)
Dezyneecole
 
Shaily Goyar, Diploma Fashion Design First Year, (Fashion Draping Project)
Shaily Goyar, Diploma Fashion Design First Year, (Fashion Draping Project)Shaily Goyar, Diploma Fashion Design First Year, (Fashion Draping Project)
Shaily Goyar, Diploma Fashion Design First Year, (Fashion Draping Project)
Dezyneecole
 
Shaily Goyar, Diploma Fashion Design First Year, (Design Basics Project)
Shaily Goyar, Diploma Fashion Design First Year, (Design Basics Project)Shaily Goyar, Diploma Fashion Design First Year, (Design Basics Project)
Shaily Goyar, Diploma Fashion Design First Year, (Design Basics Project)
Dezyneecole
 
Shaily Goyar, Diploma Fashion Design First Year, (Corel Draw Project)
Shaily Goyar, Diploma Fashion Design First Year, (Corel Draw Project)Shaily Goyar, Diploma Fashion Design First Year, (Corel Draw Project)
Shaily Goyar, Diploma Fashion Design First Year, (Corel Draw Project)
Dezyneecole
 
Tanya Jain, Diploma Fashion Design First Year, (Fashion illustration for Fash...
Tanya Jain, Diploma Fashion Design First Year, (Fashion illustration for Fash...Tanya Jain, Diploma Fashion Design First Year, (Fashion illustration for Fash...
Tanya Jain, Diploma Fashion Design First Year, (Fashion illustration for Fash...
Dezyneecole
 
Tanya Jain , Diploma Fashion Design First Year, (Basic Pattern Development Pr...
Tanya Jain , Diploma Fashion Design First Year, (Basic Pattern Development Pr...Tanya Jain , Diploma Fashion Design First Year, (Basic Pattern Development Pr...
Tanya Jain , Diploma Fashion Design First Year, (Basic Pattern Development Pr...
Dezyneecole
 
Tanya Jain, Diploma Fashion Design First Year, (Embroidery Project)
Tanya Jain, Diploma Fashion Design First Year, (Embroidery Project)Tanya Jain, Diploma Fashion Design First Year, (Embroidery Project)
Tanya Jain, Diploma Fashion Design First Year, (Embroidery Project)
Dezyneecole
 
Tanya Jain, Diploma Fashion Design First Year, (Fashion Draping Project)
Tanya Jain, Diploma Fashion Design First Year, (Fashion Draping Project)Tanya Jain, Diploma Fashion Design First Year, (Fashion Draping Project)
Tanya Jain, Diploma Fashion Design First Year, (Fashion Draping Project)
Dezyneecole
 
Tanya Jain , Diploma Fashion Design First Year, (Design Basics Project)
Tanya Jain , Diploma Fashion Design First Year, (Design Basics Project)Tanya Jain , Diploma Fashion Design First Year, (Design Basics Project)
Tanya Jain , Diploma Fashion Design First Year, (Design Basics Project)
Dezyneecole
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Illustration For Fashi...
Gouri Ramchandani, Diploma Fashion Design First Year, (Illustration For Fashi...Gouri Ramchandani, Diploma Fashion Design First Year, (Illustration For Fashi...
Gouri Ramchandani, Diploma Fashion Design First Year, (Illustration For Fashi...
Dezyneecole
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Basic Pattern Developm...
Gouri Ramchandani, Diploma Fashion Design First Year, (Basic Pattern Developm...Gouri Ramchandani, Diploma Fashion Design First Year, (Basic Pattern Developm...
Gouri Ramchandani, Diploma Fashion Design First Year, (Basic Pattern Developm...
Dezyneecole
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
Dezyneecole
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Design Basics Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Design Basics  Project)Gouri Ramchandani, Diploma Fashion Design First Year, (Design Basics  Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Design Basics Project)
Dezyneecole
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
Dezyneecole
 
Dimple Mordani, Diploma Fashion Design First Year, (Embroidery Project)
Dimple Mordani, Diploma Fashion Design First Year, (Embroidery  Project)Dimple Mordani, Diploma Fashion Design First Year, (Embroidery  Project)
Dimple Mordani, Diploma Fashion Design First Year, (Embroidery Project)
Dezyneecole
 
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
Dezyneecole
 
Dimple Mordani, Diploma Fashion Design First Year, (Basic Pattern Development...
Dimple Mordani, Diploma Fashion Design First Year, (Basic Pattern Development...Dimple Mordani, Diploma Fashion Design First Year, (Basic Pattern Development...
Dimple Mordani, Diploma Fashion Design First Year, (Basic Pattern Development...
Dezyneecole
 

More from Dezyneecole (20)

Pratibha Kumari, Diploma Fashion Design First Year, (Basic Pattern Developmen...
Pratibha Kumari, Diploma Fashion Design First Year, (Basic Pattern Developmen...Pratibha Kumari, Diploma Fashion Design First Year, (Basic Pattern Developmen...
Pratibha Kumari, Diploma Fashion Design First Year, (Basic Pattern Developmen...
 
Shaily Goyar, Diploma Fashion Design First Year, (Basic Pattern Development P...
Shaily Goyar, Diploma Fashion Design First Year, (Basic Pattern Development P...Shaily Goyar, Diploma Fashion Design First Year, (Basic Pattern Development P...
Shaily Goyar, Diploma Fashion Design First Year, (Basic Pattern Development P...
 
Shaily Goyar, Diploma Fashion Design First Year, (Fashion illustration for Fa...
Shaily Goyar, Diploma Fashion Design First Year, (Fashion illustration for Fa...Shaily Goyar, Diploma Fashion Design First Year, (Fashion illustration for Fa...
Shaily Goyar, Diploma Fashion Design First Year, (Fashion illustration for Fa...
 
Shaily Goyar, Diploma Fashion Design First Year, (Embroidery Project)
Shaily Goyar, Diploma Fashion Design First Year, (Embroidery Project)Shaily Goyar, Diploma Fashion Design First Year, (Embroidery Project)
Shaily Goyar, Diploma Fashion Design First Year, (Embroidery Project)
 
Shaily Goyar, Diploma Fashion Design First Year, (Fashion Draping Project)
Shaily Goyar, Diploma Fashion Design First Year, (Fashion Draping Project)Shaily Goyar, Diploma Fashion Design First Year, (Fashion Draping Project)
Shaily Goyar, Diploma Fashion Design First Year, (Fashion Draping Project)
 
Shaily Goyar, Diploma Fashion Design First Year, (Design Basics Project)
Shaily Goyar, Diploma Fashion Design First Year, (Design Basics Project)Shaily Goyar, Diploma Fashion Design First Year, (Design Basics Project)
Shaily Goyar, Diploma Fashion Design First Year, (Design Basics Project)
 
Shaily Goyar, Diploma Fashion Design First Year, (Corel Draw Project)
Shaily Goyar, Diploma Fashion Design First Year, (Corel Draw Project)Shaily Goyar, Diploma Fashion Design First Year, (Corel Draw Project)
Shaily Goyar, Diploma Fashion Design First Year, (Corel Draw Project)
 
Tanya Jain, Diploma Fashion Design First Year, (Fashion illustration for Fash...
Tanya Jain, Diploma Fashion Design First Year, (Fashion illustration for Fash...Tanya Jain, Diploma Fashion Design First Year, (Fashion illustration for Fash...
Tanya Jain, Diploma Fashion Design First Year, (Fashion illustration for Fash...
 
Tanya Jain , Diploma Fashion Design First Year, (Basic Pattern Development Pr...
Tanya Jain , Diploma Fashion Design First Year, (Basic Pattern Development Pr...Tanya Jain , Diploma Fashion Design First Year, (Basic Pattern Development Pr...
Tanya Jain , Diploma Fashion Design First Year, (Basic Pattern Development Pr...
 
Tanya Jain, Diploma Fashion Design First Year, (Embroidery Project)
Tanya Jain, Diploma Fashion Design First Year, (Embroidery Project)Tanya Jain, Diploma Fashion Design First Year, (Embroidery Project)
Tanya Jain, Diploma Fashion Design First Year, (Embroidery Project)
 
Tanya Jain, Diploma Fashion Design First Year, (Fashion Draping Project)
Tanya Jain, Diploma Fashion Design First Year, (Fashion Draping Project)Tanya Jain, Diploma Fashion Design First Year, (Fashion Draping Project)
Tanya Jain, Diploma Fashion Design First Year, (Fashion Draping Project)
 
Tanya Jain , Diploma Fashion Design First Year, (Design Basics Project)
Tanya Jain , Diploma Fashion Design First Year, (Design Basics Project)Tanya Jain , Diploma Fashion Design First Year, (Design Basics Project)
Tanya Jain , Diploma Fashion Design First Year, (Design Basics Project)
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Illustration For Fashi...
Gouri Ramchandani, Diploma Fashion Design First Year, (Illustration For Fashi...Gouri Ramchandani, Diploma Fashion Design First Year, (Illustration For Fashi...
Gouri Ramchandani, Diploma Fashion Design First Year, (Illustration For Fashi...
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Basic Pattern Developm...
Gouri Ramchandani, Diploma Fashion Design First Year, (Basic Pattern Developm...Gouri Ramchandani, Diploma Fashion Design First Year, (Basic Pattern Developm...
Gouri Ramchandani, Diploma Fashion Design First Year, (Basic Pattern Developm...
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Design Basics Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Design Basics  Project)Gouri Ramchandani, Diploma Fashion Design First Year, (Design Basics  Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Design Basics Project)
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
 
Dimple Mordani, Diploma Fashion Design First Year, (Embroidery Project)
Dimple Mordani, Diploma Fashion Design First Year, (Embroidery  Project)Dimple Mordani, Diploma Fashion Design First Year, (Embroidery  Project)
Dimple Mordani, Diploma Fashion Design First Year, (Embroidery Project)
 
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
 
Dimple Mordani, Diploma Fashion Design First Year, (Basic Pattern Development...
Dimple Mordani, Diploma Fashion Design First Year, (Basic Pattern Development...Dimple Mordani, Diploma Fashion Design First Year, (Basic Pattern Development...
Dimple Mordani, Diploma Fashion Design First Year, (Basic Pattern Development...
 

Recently uploaded

What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 

Recently uploaded (20)

What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 

Bhanu Pratap Singh Shekhawat, BCA Third Year

  • 1. SUBMITED BY Bhanu Pratap Singh Shekhawat Bachelor of Computer Application II YEAR Dezyne E’cole College www.dezyneecole.com INFORMATION TECHNOLOGY PROJECT REPORT C++ PROGRAMMING Online Exam TOPIC C++
  • 2. Project Report On C++ Programming At Dezyne E’cole College Ajmer Submitted to Dezyne E’cole College Towards the Partial Fulfillment on Bachelor of Computer Application By Bhanu Pratap Singh Shekhawat Dezyne E’cole College 106/10 Civil Line, Ajmer Tel – 0145-2624679 Www.dezyneecole.com 2016
  • 3. Acknowledgement I Bhanu Pratap Singh Shekhawat, Student On Dezyne E’cole College, An Extremely Grateful To Each And Every Individual. Who Has Contributed. In Successful Completion Of My Project. I Express My Gratitude Towards Dezyne E’cole College For Their. Guidance and Contrast Supervision As Well As For Providing The Necessary Information And Support Regarding The Completion Of Project Thank You
  • 4. 1 | P a g e Synopsis This Project Is A Minor. Project Made, Based On The Practical Concept Of C++ This Project Has Made Our Basic Practical Concepts On C++ Strong
  • 5. 2 | P a g e
  • 6. 3 | P a g e
  • 7. 4 | P a g e
  • 8. 5 | P a g e
  • 9. 6 | P a g e #include<iostream.h> #include<string.h> #include<conio.h> #include<stdio.h> #include<stdlib.h> #include<dos.h> #include<fstream.h> class exam { public: int qn; char q[200]; char oa[60]; char ob[60]; char oc[60]; char od[60]; char ans[3]; }; class admin { public: char id[60]; char password[60]; }; class student { public: char id[60]; char password[60]; char fname[60]; char lname[60]; }; class result { public: char id[60]; int ca; char fname[60]; char lname[60]; }; class randomq { public:
  • 10. 7 | P a g e int ran; }; class gd { public: int gdcq; }; exam a; admin b; student c; result e; randomq ra; gd gdv; fstream f; fstream y; void main() { class use { public: void white() { textcolor(0); textbackground(7); for(int i=0;i<2000;i++) { cprintf(" "); } } /*Add Question and answer*/ /*final*/ void data() { white(); a.qn=0; exam w; f.open("exam.dat",ios::in); while(f) { f.read((char *) &w,sizeof(w)); if(f==0) {
  • 11. 8 | P a g e break; } a.qn=w.qn; } f.close(); a.qn++; gotoxy(30,3); cout<<"Add Question & Answer"; gotoxy(20,5); cout<<"Q."<<a.qn<<" "; cin.getline(a.q,200); gotoxy(20,7); cout<<"A."; cin.getline(a.oa,60); gotoxy(50,7); cout<<"B."; cin.getline(a.ob,60); gotoxy(20,9); cout<<"C."; cin.getline(a.oc,60); gotoxy(50,9); cout<<"D."; cin.getline(a.od,60); gotoxy(30,12); cout<<"Ans."; cin.getline(a.ans,3); textcolor(4); gotoxy(50,15); cprintf("S"); gotoxy(56,15); cprintf("C"); textcolor(BLACK); gotoxy(51,15); cprintf("ave"); gotoxy(57,15); cout<<"ancel"; char n; bk: n=getch(); if(n=='S' || n=='s') { din(); goto en;
  • 12. 9 | P a g e } else if(n=='c' || n=='C') { goto en; } else { goto bk; } en: } /*Store Question and answer*/ /*final*/ void din() { f.open("exam.dat",ios::app | ios::out); f.write((char *) &a,sizeof(a)); f.close(); } /*Output Question and answer*/ /*final*/ void dout() { gotoxy(2,2); cout<<"Questions :-"; for(int i=1;i<=79;i++) { gotoxy(i,3); cout<<"-"; } int cp=4; exam w; f.open("exam.dat",ios::in); while(f) { f.read((char *) &w,sizeof(w)); if(f==0) { break; } // a.qn=w.qn; // strcpy(a.q,w.q); // strcpy(a.oa,w.oa); // strcpy(a.ob,w.ob); // strcpy(a.oc,w.oc);
  • 13. 10 | P a g e // strcpy(a.od,w.od); // strcpy(a.ans,w.ans); gotoxy(4,cp); cout<<w.qn<<" "; int k=0,kk=7; while(w.q[k]!='0') { gotoxy(kk,cp); cout<<w.q[k]; if(kk>=65) { if(w.q[k]==32) { kk=7; cp++; } } k++; kk++; } cp+=2; if(cp>=17) { for(int i=1;i<=79;i++) { gotoxy(i,18); cout<<"-"; } gotoxy(5,20); cout<<"Press any key to continue..."; getch(); clrscr(); gotoxy(2,2); cout<<"Questions :-"; for(i=1;i<=79;i++) { gotoxy(i,3); cout<<"-"; } cp=4; } // cout<<w.oa; // cout<<w.ob;
  • 14. 11 | P a g e // cout<<w.oc; // cout<<w.od; // cout<<w.ans; delay(200); } f.close(); getch(); } /*Make student id*/ /*final*/ void studentid() { idl: white(); gotoxy(30,3); cout<<"Make Student Id"; gotoxy(25,5); cout<<"Id : "; cin.getline(c.id,60); student w; f.open("stu_id.dat",ios::in); while(f) { f.read((char *) &w,sizeof(w)); if(strcmp(c.id,w.id)==0) { cout<<"nId is already exist"; delay(2000); clrscr(); goto idl; } if(f==0) { break; } } f.close(); gotoxy(19,7); cout<<"Password : "; //for input password int sic=-1; while(c.password[sic]!=13) { sic++; c.password[sic]=getch();
  • 15. 12 | P a g e cout<<"*"; if(c.password[sic]==8) { cout<<"b bb b"; sic-=2; } } c.password[sic]='0'; // cin.getline(c.password,60); gotoxy(17,9); cout<<"First name : "; cin.getline(c.fname,60); gotoxy(18,11); cout<<"Last name : "; cin.getline(c.lname,60); textcolor(4); gotoxy(32,15); cprintf("S"); gotoxy(38,15); cprintf("C"); textcolor(0); gotoxy(33,15); cprintf("ave"); gotoxy(39,15); cout<<"ancel"; char n; cl: n=getch(); if(n=='S' || n=='s') { studentdin(); goto dn; } else if(n=='C' || n=='c') { goto dn; } else { goto cl; } dn: }
  • 16. 13 | P a g e /*Store student id*/ /*final*/ void studentdin() { f.open("stu_id.dat",ios::app | ios::out); f.write((char *) &c,sizeof(c)); f.close(); } /*Output student id*/ /*final*/ void studentdout() { white(); student w; f.open("stu_id.dat",ios::in); while(f) { f.read((char *) &w,sizeof(w)); if(f==0) { break; } // strcpy(c.id,w.id); // strcpy(c.password,w.password); // strcpy(c.fname,w.fname); // strcpy(c.lname,w.lname); cout<<"t"<<w.id<<endl; cout<<"t"<<w.password<<endl; cout<<"t"<<w.fname<<endl; cout<<"t"<<w.lname<<endl; delay(1000); } f.close(); } /*Make admin data*/ /*Final*/ void adminid() { white(); gotoxy(30,3); cout<<"Make admin Id"; gotoxy(25,5); cout<<"Enter id : "; cin.getline(b.id,60); gotoxy(19,7); cout<<"Enter password : ";
  • 17. 14 | P a g e cin.getline(b.password,60); textcolor(4); gotoxy(30,10); cprintf("S"); gotoxy(36,10); cprintf("C"); textcolor(0); gotoxy(31,10); cprintf("ave"); gotoxy(37,10); cout<<"ancel"; char n; wi: n=getch(); if(n=='S' || n=='s') { admindin(); goto el; } else if(n=='C' || n=='c') { goto el; } else { goto wi; } el: } /*Store admin id*/ /*Final*/ void admindin() { f.open("admin.dat",ios::app | ios::out); f.write((char *) &b,sizeof(b)); f.close(); } /*Output admin id*/ /*Final*/ void admindout() { white(); admin w; f.open("admin.dat",ios::in); while(f)
  • 18. 15 | P a g e { f.read((char *) &w, sizeof(w)); if(f==0) { break; } // strcpy(b.id,w.id); // strcpy(b.password,w.password); cout<<w.id<<endl; cout<<w.password<<endl; delay(1000); } f.close(); } /*Change admin id*/ /*Final*/ void changeadminid() { nmp: white(); char oid[60],nid[60]; gotoxy(30,4); cout<<"Change admin Id : "; gotoxy(25,6); cout<<"Old id : "; cin.getline(oid,60); admin w; f.open("admin.dat",ios::in); while(f) { f.read((char *) &w,sizeof(w)); if(f==0) { break; } } f.close(); if(strcmp(oid,w.id)==0) { gotoxy(25,8); cout<<"New id : "; cin.getline(nid,60); textcolor(4); gotoxy(30,12);
  • 19. 16 | P a g e cprintf("S"); gotoxy(36,12); cprintf("C"); textcolor(0); gotoxy(31,12); cprintf("ave"); gotoxy(37,12); cout<<"ancel"; char n; wl: n=getch(); if(n=='S' || n=='s') { admin w; y.open("tadmin.dat",ios::app | ios::out); f.open("admin.dat",ios::in); while(f) { f.read((char *) &w, sizeof(w)); if(f==0) { break; } if(strcmp(oid,w.id)==0) { strcpy(w.id,nid); y.write((char *) &w, sizeof(w)); } else { y.write((char *) &w, sizeof(w)); } } y.close(); f.close(); remove("admin.dat"); rename("tadmin.dat","admin.dat"); goto cl; } else if(n=='C' || n=='c') { goto cl; }
  • 20. 17 | P a g e else { goto wl; } } else { gotoxy(30,11); cout<<"Id not match"; delay(1600); clrscr(); goto nmp; } cl: } /*Change admin password*/ /*Final*/ void changeadminpass() { nmp: white(); char opass[60],npass[60],cpass[60]; gotoxy(30,4); cout<<"Change admin password"; gotoxy(25,6); cout<<"Old password : "; //for input password int sic=-1; while(opass[sic]!=13) { sic++; opass[sic]=getch(); cout<<"*"; if(opass[sic]==8) { cout<<"b bb b"; sic-=2; } } opass[sic]='0'; // cin.getline(opass,60); admin w; f.open("admin.dat",ios::in); while(f) {
  • 21. 18 | P a g e f.read((char *) &w, sizeof(w)); if(f==0) { break; } } f.close(); if(strcmp(opass,w.password)==0) { gotoxy(25,8); cout<<"New password : "; //for input password int sic=-1; while(npass[sic]!=13) { sic++; npass[sic]=getch(); cout<<"*"; if(npass[sic]==8) { cout<<"b bb b"; sic-=2; } } npass[sic]='0'; // cin.getline(npass,60); gotoxy(21,10); cout<<"Confirm password : "; gotoxy(35,12); //for input password sic=-1; while(cpass[sic]!=13) { sic++; cpass[sic]=getch(); cout<<"*"; if(cpass[sic]==8) { cout<<"b bb b"; sic-=2; } } cpass[sic]='0'; // cin.getline(cpass,60); if(strcmp(npass,cpass)==0)
  • 22. 19 | P a g e { textcolor(4); gotoxy(35,14); cprintf("S"); gotoxy(41,14); cprintf("C"); textcolor(0); gotoxy(36,14); cprintf("ave"); gotoxy(42,14); cout<<"ancel"; char n; wl: n=getch(); if(n=='S' || n=='s') { admin w; y.open("tadmin.dat",ios::app | ios::out); f.open("admin.dat",ios::in); while(f) { f.read((char *) &w, sizeof(w)); if(f==0) { break; } if(strcmp(opass,w.password)==0) { strcpy(w.password,npass); y.write((char *) &w, sizeof(w)); } else { y.write((char *) &w, sizeof(w)); } } y.close(); f.close(); remove("admin.dat"); rename("tadmin.dat","admin.dat"); goto cl; } else if(n=='C' || n=='c')
  • 23. 20 | P a g e { goto cl; } else { goto wl; } } else { gotoxy(30,13); cout<<"Password not match"; delay(1600); clrscr(); goto nmp; } } else { gotoxy(30,13); cout<<"Password not match"; delay(1600); clrscr(); goto nmp; } cl: } /*Student log in*/ /*Final*/ void studentlog() { white(); gotoxy(30,4); cout<<"Log in"; gotoxy(25,6); cout<<"Id : "; cin.getline(c.id,60); gotoxy(19,8); cout<<"Password : "; //for input password int sic=-1; while(c.password[sic]!=13) { sic++; c.password[sic]=getch();
  • 24. 21 | P a g e cout<<"*"; if(c.password[sic]==8) { cout<<"b bb b"; sic-=2; } } c.password[sic]='0'; // cin.getline(c.password,60); textcolor(4); gotoxy(30,12); cprintf("L"); gotoxy(39,12); cprintf("C"); textcolor(0); gotoxy(31,12); cprintf("ogin"); gotoxy(40,12); cout<<"ancel"; char n; int g=0; wi: n=getch(); if(n=='L' || n=='l') { student w; f.open("stu_id.dat",ios::in); while(f) { f.read((char *) &w, sizeof(w)); if(strcmp(c.id,w.id)==0 && strcmp(c.password,w.password)==0) { clrscr(); strcpy(c.id,w.id); strcpy(c.password,w.password); strcpy(c.fname,w.fname); strcpy(c.lname,w.lname); g++; break; } g=0; if(f==0)
  • 25. 22 | P a g e { break; } } f.close(); if(g==0 || g=='0') { gotoxy(30,10); cout<<"Id not valid"; delay(1500); main(); } goto en; } else if(n=='C' || n=='c') { main(); } else { goto wi; } en: } /*Student option*/ /*Final*/ void studentopp() { white(); gotoxy(30,4); cout<<"Welcome "<<c.fname; gotoxy(38,5); cout<<c.lname; gotoxy(30,18); cout<<"Choose your option"; gotoxy(28,7); cout<<"1. Test"; /*Right*/ gotoxy(28,9); cout<<"2. View result"; gotoxy(28,11); cout<<"3. Change Id"; gotoxy(28,13); cout<<"4. Change Password"; gotoxy(28,15);
  • 26. 23 | P a g e cout<<"5. Log out"; } /*Admin panel*/ /*Final*/ void adminopp() { white(); gotoxy(30,4); cout<<"Choose your option"; gotoxy(28,6); cout<<"1. Add Question and answer"; /*right*/ gotoxy(28,8); cout<<"2. Change admin Id"; /*right*/ gotoxy(28,10); cout<<"3. Change admin password"; /*right*/ gotoxy(28,12); cout<<"4. Make student Id"; /*right*/ gotoxy(28,14); cout<<"5. View student result"; /*Right*/ gotoxy(28,16); cout<<"6. Student modification"; /*Right*/ gotoxy(28,18); cout<<"7. View question"; /*Right*/ gotoxy(28,20); cout<<"8. Delete Questions"; /*Right*/ gotoxy(28,22); cout<<"9. Log out"; } /*Modify student detail*/ /*final*/ void studentmodify() { white(); gotoxy(30,4); cout<<"Choose your option"; gotoxy(28,6); cout<<"1. Id"; /*Right*/ gotoxy(28,8); cout<<"2. Password"; /*Right*/ gotoxy(28,10); cout<<"3. Back"; } /*Change student id*/ /*Final*/ void changestudentid() {
  • 27. 24 | P a g e nmp: white(); char oid[60],nid[60]; int h=0; gotoxy(30,4); cout<<"Change Student Id : "; gotoxy(25,6); cout<<"Old id : "; cin.getline(oid,60); student w; f.open("stu_id.dat",ios::in); while(f) { f.read((char *) &w, sizeof(w)); if(f==0) { break; } if(strcmp(oid,w.id)==0) { h++; break; } } f.close(); if(h>0) { gotoxy(25,8); cout<<"New id : "; cin.getline(nid,60); textcolor(4); gotoxy(30,12); cprintf("S"); gotoxy(36,12); cprintf("C"); textcolor(0); gotoxy(31,12); cprintf("ave"); gotoxy(37,12); cout<<"ancel"; char n; wl: n=getch();
  • 28. 25 | P a g e if(n=='S' || n=='s') { student w; y.open("tstu_id.dat",ios::app | ios::out); f.open("stu_id.dat",ios::in); while(f) { f.read((char *) &w, sizeof(w)); if(f==0) { break; } if(strcmp(oid,w.id)==0 && strcmp(c.id,w.id)==0 && strcmp(c.password,w.password)==0) { strcpy(w.id,nid); y.write((char *) &w, sizeof(w)); } else { y.write((char *) &w, sizeof(w)); } } y.close(); f.close(); remove("stu_id.dat"); rename("tstu_id.dat","stu_id.dat"); goto cl; } else if(n=='C' || n=='c') { goto cl; } else { goto wl; } } else { gotoxy(30,11); cout<<"Id not match"; delay(1600);
  • 29. 26 | P a g e clrscr(); goto cl; } cl: } /*Change student password*/ /*Final*/ void changestudentpass() { nmp: white(); char opass[60],npass[60],cpass[60]; int h=0; gotoxy(30,4); cout<<"Change Student password"; gotoxy(25,6); cout<<"Old password : "; int sic=-1; while(opass[sic]!=13) { sic++; opass[sic]=getch(); cout<<"*"; if(opass[sic]==8) { cout<<"b bb b"; sic-=2; } } opass[sic]='0'; // cin.getline(opass,60); student w; f.open("stu_id.dat",ios::in); while(f) { f.read((char *) &w, sizeof(w)); if(f==0) { break; } if(strcmp(opass,w.password)==0) { h++; break;
  • 30. 27 | P a g e } } f.close(); if(h>0) { gotoxy(25,8); cout<<"New password : "; int sic=-1; while(npass[sic]!=13) { sic++; npass[sic]=getch(); cout<<"*"; if(npass[sic]==8) { cout<<"b bb b"; sic-=2; } } npass[sic]='0'; // cin.getline(npass,60); gotoxy(21,10); cout<<"Confirm password : "; sic=-1; while(cpass[sic]!=13) { sic++; cpass[sic]=getch(); cout<<"*"; if(cpass[sic]==8) { cout<<"b bb b"; sic-=2; } } cpass[sic]='0'; // cin.getline(cpass,60); if(strcmp(npass,cpass)==0) { textcolor(4); gotoxy(35,14); cprintf("S"); gotoxy(41,14);
  • 31. 28 | P a g e cprintf("C"); textcolor(0); gotoxy(36,14); cprintf("ave"); gotoxy(42,14); cout<<"ancel"; char n; wl: n=getch(); if(n=='S' || n=='s') { student w; y.open("tstu_id.dat",ios::app | ios::out); f.open("stu_id.dat",ios::in); while(f) { f.read((char *) &w, sizeof(w)); if(f==0) { break; } if(strcmp(opass,w.password)==0 && strcmp(c.id,w.id)==0 && strcmp(c.password,w.password)==0) { strcpy(w.password,npass); y.write((char *) &w, sizeof(w)); } else { y.write((char *) &w, sizeof(w)); } } y.close(); f.close(); remove("stu_id.dat"); rename("tstu_id.dat","stu_id.dat"); goto cl; } else if(n=='C' || n=='c') { goto cl; } else
  • 32. 29 | P a g e { goto wl; } } else { gotoxy(30,13); cout<<"Password not match"; delay(1600); clrscr(); goto nmp; } } else { gotoxy(30,13); cout<<"Password not match"; delay(1600); clrscr(); goto nmp; } cl: } /*Clock*/ /*Final*/ void clock() { int m,s,ms; m=s=ms=0; cout<<endl<<"t"; for(;1;) { clrscr(); cout<<m<<":"<<s<<":"<<ms; if(m==10) { break; } delay(10); ms++; if(ms==100) { s++; ms=0;
  • 33. 30 | P a g e if(s==60) { s=0; m++; } } } } /*Test question*/ /*Final*/ void question() { white(); gdv.gdcq=0; exam wa; f.open("exam.dat",ios::in); while(f) { f.read((char *) &wa, sizeof(wa)); if(wa.qn==5) { gdv.gdcq++; break; } if(f==0) { break; } } f.close(); if(gdv.gdcq==0) { gotoxy(25,5); cout<<"Not Edited five Question"; return; } randomq req; y.open("random.dat",ios::in); while(y) { y.read((char *) &req,sizeof(req)); if(y==0) { break;
  • 34. 31 | P a g e } ra.ran=req.ran; } y.close(); if(ra.ran>=1 && ra.ran<=800) { goto jum; } else { ra.ran=1; } jum: int Qn=0; char as[200]; int anc=0; int ncoun=0; int m,s,ms; m=s=ms=0; clrscr(); exam w; f.open("exam.dat",ios::in); while(f) { back: f.read((char *) &w, sizeof(w)); if(ncoun==0 && ra.ran!=w.qn) { goto back; } ncoun++; if(Qn==5) { ra.ran=w.qn; break; } if(Qn!=5 && f==0) { f.close(); f.open("exam.dat",ios::in); ra.ran=1; goto back; }
  • 35. 32 | P a g e clrscr(); Qn++; lb: clrscr(); for(;1;) // { gotoxy(25,6); cout<<"Q "<<Qn<<" "; int k=0,kk=30,kkc=6; while(w.q[k]!='0') { gotoxy(kk,kkc); cout<<w.q[k]; if(kk>=65) { if(w.q[k]==32) { kk=30; kkc++; } } k++; kk++; } gotoxy(25,9); cout<<"A. "<<w.oa; gotoxy(45,9); cout<<"B. "<<w.ob; gotoxy(25,11); cout<<"C. "<<w.oc; gotoxy(45,11); cout<<"D. "<<w.od; gotoxy(30,13); cout<<"Ans. "; if(s>=10 && s<=60) { gotoxy(68,3); cout<<"0"<<m<<":"<<s<<":"<<ms; } else { gotoxy(68,3); cout<<"0"<<m<<":0"<<s<<":"<<ms;
  • 36. 33 | P a g e } if(m==3) { break; } delay(10); ms++; if(ms==100) { s++; ms=0; if(s==60) { s=0; m++; } } if(kbhit()) { gotoxy(35,13); as[0]=getch(); as[1]='0'; if(as[1]!='0') { goto lb; } if(as[0]=='a' || as[0]=='A') { if(as[0]==w.ans[0] || (as[0]+32)==w.ans[0] || (as[0]-32)==w.ans[0]) { anc++; clrscr(); goto en; } goto en; } else if(as[0]=='b' || as[0]=='B') { if(as[0]==w.ans[0] || (as[0]+32)==w.ans[0] || (as[0]-32)==w.ans[0]) { anc++;
  • 37. 34 | P a g e clrscr(); goto en; } goto en; } else if(as[0]=='c' || as[0]=='C') { if(as[0]==w.ans[0] || (as[0]+32)==w.ans[0] || (as[0]-32)==w.ans[0]) { anc++; clrscr(); goto en; } goto en; } else if(as[0]=='d' || as[0]=='D') { if(as[0]==w.ans[0] || (as[0]+32)==w.ans[0] || (as[0]-32)==w.ans[0]) { anc++; clrscr(); goto en; } goto en; } else { clrscr(); goto lb; } } } //en en: if(m==3) { break; } clrscr(); } f.close(); clrscr();
  • 38. 35 | P a g e remove("random.dat"); y.open("random.dat",ios::app | ios::out); y.write((char *) &ra,sizeof(ra)); y.close(); strcpy(e.id,c.id); e.ca=anc; strcpy(e.fname,c.fname); strcpy(e.lname,c.lname); result z; y.open("result.dat",ios::in); while(y) { y.read((char *) &z,sizeof(z)); if(strcmp(z.id,e.id)!=0) { f.open("tresult.dat",ios::app | ios::out); f.write((char *) &z,sizeof(z)); f.close(); } } y.close(); remove("result.dat"); rename("tresult.dat","result.dat"); f.open("result.dat",ios::app | ios::out); f.write((char *) &e,sizeof(e)); f.close(); } /*Test result*/ /*Final*/ void testresult() { white(); int re=0; result z; y.open("result.dat",ios::in); while(y) { y.read((char *) &z,sizeof(z)); if(strcmp(z.id,c.id)==0) { re=1; break; } }
  • 39. 36 | P a g e y.close(); if(re==0) { gotoxy(25,4); cout<<"Result not available"; getch(); return; } clrscr(); for(int i=2;i<=16;i++) { for(int j=25;j<=55;j++) { if(i==2 || i==16 || i==6 || i==14) { gotoxy(j,i); cout<<"-"; } if(i>=3 && i<=15) { if(j==25 || j==55) { gotoxy(j,i); cout<<"|"; } } if(i>=7 && i<=13) { if(j==43) { gotoxy(j,i); cout<<"|"; } } } } gotoxy(28,3); cout<<"Id : "<<c.id; gotoxy(27,5); cout<<"Name : "<<c.fname; // cout<<c.lname; gotoxy(27,7); cout<<"Total Question";
  • 40. 37 | P a g e gotoxy(48,7); cout<<"5"; gotoxy(27,9); cout<<"Correct answer"; gotoxy(48,9); cout<<z.ca; gotoxy(27,11); cout<<"Total Marks"; gotoxy(48,11); cout<<"50"; gotoxy(27,13); cout<<"Obtain Marks"; gotoxy(48,13); cout<<(z.ca*10); gotoxy(27,15); cout<<"Result : "; if((z.ca*10)>=30) { cout<<"Pass"; } else { textcolor(4); cprintf("Fail"); } gotoxy(27,18); cout<<"Press any key to Back....."; getch(); } /*Front screen*//*Final*/ void front() { white(); gotoxy(30,4); cout<<"Online Exam"; gotoxy(27,7); cout<<"1. Student Panel"; gotoxy(27,9); cout<<"2. Administrator Panel"; gotoxy(27,11); cout<<"3. Exit"; } /*admin login*//*final*/
  • 41. 38 | P a g e void adminlog() { white(); gotoxy(30,4); cout<<"Log in"; gotoxy(25,6); cout<<"Id : "; cin.getline(b.id,60); gotoxy(19,8); cout<<"Password : "; int sic=-1; while(b.password[sic]!=13) { sic++; b.password[sic]=getch(); cout<<"*"; if(b.password[sic]==8) { cout<<"b bb b"; sic-=2; } } b.password[sic]='0'; // cin.getline(b.password,60); textcolor(4); gotoxy(30,12); cprintf("L"); gotoxy(39,12); cprintf("C"); textcolor(0); gotoxy(31,12); cprintf("ogin"); gotoxy(40,12); cout<<"ancel"; char n; int g=0; wi: n=getch(); if(n=='L' || n=='l') { admin w; f.open("admin.dat",ios::in); while(f)
  • 42. 39 | P a g e { f.read((char *) &w, sizeof(w)); if(strcmp(b.id,w.id)==0 && strcmp(b.password,w.password)==0) { clrscr(); gotoxy(30,4); cout<<"Welcome Admin"; g++; break; } g=0; if(f==0) { break; } } f.close(); if(g==0 || g=='0') { gotoxy(30,10); cout<<"Id not valid"; delay(1500); main(); } goto en; } else if(n=='C' || n=='c') { main(); } else { goto wi; } en: } /*Delete question*//*Final*/ void dele() { bkl: white(); int delq;
  • 43. 40 | P a g e gotoxy(25,3); cout<<"Enter Question no. you want to delete"; gotoxy(25,5); cout<<"Enter : "; cin>>delq; int cou=0; exam w; f.open("exam.dat",ios::in); while(f) { f.read((char *) &w,sizeof(w)); if(f==0) { break; } if(delq==w.qn) { cou=1; break; } } f.close(); if(cou==0) { gotoxy(25,9); cout<<"Question not available"; getch(); clrscr(); goto bkl; } textcolor(4); gotoxy(30,7); cprintf("D"); gotoxy(40,7); cprintf("C"); textcolor(0); gotoxy(31,7); cprintf("elete"); gotoxy(41,7); cout<<"ancel"; char n; bk: n=getch();
  • 44. 41 | P a g e if(n=='d' || n=='D') { exam w; f.open("exam.dat",ios::in); y.open("texam.dat",ios::app | ios::out); while(f) { f.read((char *) &w,sizeof(w)); if(f==0) { break; } if(delq!=w.qn) { y.write((char *) &w,sizeof(w)); } } y.close(); f.close(); remove("exam.dat"); rename("texam.dat","exam.dat"); cou=1; f.open("exam.dat",ios::in); y.open("texam.dat",ios::app | ios::out); while(f) { f.read((char *) &w,sizeof(w)); if(f==0) { break; } w.qn=cou; y.write((char *) &w,sizeof(w)); cou++; } y.close(); f.close(); remove("exam.dat"); rename("texam.dat","exam.dat"); goto en; } else if(n=='c' || n=='C') {
  • 45. 42 | P a g e goto en; } else { goto bk; } en: } /*Ready to test*/ /*Final*/ void ready() { white(); char re1[50]="You have three minutes to complete your test"; int i=0; gotoxy(21,4); while(re1[i]!='0') { delay(50); cout<<re1[i]; i++; } char re[15]="Ready"; i=0; gotoxy(37,6); while(re[i]!='0') { delay(50); cout<<re[i]; i++; } textcolor(4); gotoxy(33,9); cprintf("Y"); gotoxy(43,9); cprintf("N"); textcolor(0); gotoxy(34,9); cprintf("es"); gotoxy(44,9); cout<<"o"; char n; bk: n=getch();
  • 46. 43 | P a g e if(n=='y' || n=='Y') { gdv.gdcq=1; goto en; } else if(n=='n' || n=='N') { gdv.gdcq=0; goto en; } else { goto bk; } en: } /*Result process*//*Final*/ void process() { white(); char wt[50]="Result will be process"; int i=0; gotoxy(30,6); while(wt[i]!='0') { delay(50); cout<<wt[i]; i++; } char wt1[20]="Wait few second"; i=0; gotoxy(34,7); while(wt1[i]!='0') { delay(50); cout<<wt1[i]; i++; } for(i=1;i<=12;i++) { delay(600); if(i==4 || i==7 || i==10) {
  • 47. 44 | P a g e cout<<"b bb b"; } else { cout<<"."; } } } }; }
  • 48. 45 | P a g e THANK YOU