Академический Документы
Профессиональный Документы
Культура Документы
A project report on
QIUZ
Submitted in partial fulfillment to CBSE boards as a part of HSC
curriculum
By:
JAYDEEP VASANI
Roll No.:30
Acknowledgment
Abstract
This is a highly flexible quiz project that can be used to test your visitors, with the
accurate results. This project supports arbitrary number of questions, each
supporting an arbitrary number of choices. This quiz program project is based on
C++ programming where the users can check their knowledge by answering the
questions . The results are accurate for the users. This project can be easily
handled by the users. This quiz program is fully designed with C++ programming.
This is a complete quiz portal for quiz masters.
Project profile
Project Name
Developer
Platform
Methodology
Tools
JAYDEEP VASANI
Windows Operating System
Duration
STRUCTURE
Programming language: c++
IDE
: Turbo c++
12th june 2016 to 13nd jan2015
Internal Guide
Hardware Requirements:
Hardware
Requirements
1) Operating system
2) Ram
2) 2 GB ram
3) 2 MB
4) Processor
#include<conio.h>
#include<fstream.h>
#include<string.h>
#include<stdio.h>
#include<process.h>
#include<dos.h>
{
cout << "Write question";
cout << "\n\nQuestion No.: ";
cin >> s1.sr_no;
cout << "Question: \n";
gets(s1.que);
cout << "Options: \n";
char opt[4] = {'a','b','c','d'} ;
for(int j=0;j<4;j++)
{
//cout << ":" << j+1 << ": ";
cout << ":" << opt[j] << ": " ;
gets(s1.opt[j]);
}
cout << "\nAnswer: ";
cin >> s1.ans;
fout.write((char*)&s1,sizeof(s1));
cout << "\n\n ----- Question Written in file -----";
getch();
clrscr();
}
fout.close();
getch();
}
void read_ques_gen(char *c)
{
ifstream fin(c,ios::in|ios::binary);
ofstream fout2("ans.txt",ios::out|ios::binary);
if(!fin)
{
cout << "Sorry Exam can't be conducted due to technical reason";
getch();
exit(0);
}
//
fin.seekg(0);
int cnt=0;
char opt[4] = {'a','b','c','d'} ;
//fin.read((char*)&s2,sizeof(s2));
while(!fin.eof())
{
fin.read((char*)&s2,sizeof(s2));
cout << endl << s2.sr_no << "> " << s2.que << endl;
for(int j=0;j<=3;j++)
{
cout << "(" << opt[j] << ") " <<s2.opt[j] << "\n";
}
cout << "\n\n Enter ans: ";
//clrscr();
cin >> gs1.user_ans;
fout2.write((char*)&gs1,sizeof(gs1));
cnt++;
getch();
clrscr();
if(cnt==10)
{
break;
}
}
fin.close();
fout2.close();
}
void calc_marks_gen(char *ch)
{
clrscr();
cout << "Wait... Your Result is in process";
for(int k=0;k<5;k++)
{
cout << ".";
sleep(1);
}
ifstream fin1(ch,ios::in|ios::binary);
ifstream fin2("ans.txt",ios::in|ios::binary);
int count=0;
int c=0;
while(!fin1.eof() && !fin2.eof())
{
fin1.read((char*)&s3,sizeof(s3));
fin2.read((char*)&gs2,sizeof(gs2));
if(s3.ans == gs2.user_ans)
{
count++;
}
c++;
if(c==10)
{
break;
}
}
clrscr();
cout << "You Scored: " << count;
getch();
}
FUTURE ENHANCEMENT
PROVIDING NEW UPDATES TO THE QUIZ FILES(SO USER CAN GET MORE NEW THINGS)