Вы находитесь на странице: 1из 13

KENDRIYA VIDYALAYA IIT KANPUR

INVESTIGATORY PROJECT

General Quiz Game

2017-18

In the partial fulfillment of All India Senior School


Certificate Examination for Class XI session 2017-
2018 conducted by Central Board Of Secondary
Education.

Ayush
Sharma
CLASS—XI-A
ROLL NO. : 08

ACKNOWLEDGEMENT

I would like to convey my heartful thanks to


Mr. P.N.Chaki, PGT(Computer Science) who
always gave valuable suggestions & guidance
for completion of my project.
He helped me to understand & remember
important details of the project. My project
has been a success only because of his
guidance.
I am especially indented & I am also
beholden to my friends. And finally I thank to
the members of my family for their support
& encouragement.

Ayush Sharma
XI-A
CERTIFICATE

This is to certify that Ayush Sharma


of class XI-A of KENDRIYA VIDYALAYA
IIT KANPUR, has completed his/her
project under my supervision. He/she
has taken proper care & shown
sincerity in completion of this project.
I certify that this project is up to
my expectation & as per the guideline
issued by CBSE.

Mr. P.N.CHAKI
PGT(Computer
Science)
IIT Kanpur
Help Line of Flow
of Control

Here in this project we have an


important role of flow of control.
Since for multiple iterations it is
necessary to use them and for re
execution of program code will only
be possible through flow of control.
Content
1. Introduction

2. Source Code

3. Output

4. Bibliography
Introduction
This 'QUIZ GAME' Project is designed for a question in
which you can generate and manage a simple database
for questions. The question number is automatically
generated by the software and is stored in a binary file
by the name 'QUESTION'. This data base is basically
used as a MASTER file to be used as a look-up table for
information like Quiz Option, SubMenu, either
Computer/Mathematics/Science or General and the
Return. In this software you can ask for any Menu on
the basis of the Menu Question will be asked to the user
& the user gets time for answering the question. If the
user is correct the he get 10 points on every question. If
he is incorrect then he lost the game & game is closed.
Source Code
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int x,n;
x=0;
char choice[100],ch1;
cout<<"\n\n\t\t *************";
cout<<"\n\n\t\t * Quiz Game *";
cout<<"\n\n\t\t *************";
cout<<"\n\n\t\t====================================";
cout<<"\n\n\t\t= Developed By :Ayush Sharma =";
cout<<"\n\n\t\t====================================";
cout<<"\n\n";
cout<<"\n Please Enter Your Name : ";
cin>>choice;
clrscr();
cout<<"\n\n";
cout<<"\n\n\t\t Welcome "<<choice<<"\n";
cout<<"\n\n\t\t Loading Please wait........";
cout<<"\n\n\t\t 1) Start Quiz";
cout<<"\n\n\t\t 2) View Score";
cout<<"\n\n\t\t 3) Exit Quiz";
cout<<"\n\n Enter Your Choice :--> ";
cin>>n;
clrscr();
switch(n)
{
case 1:
cout<<"\n\n\n Note :Enter answer in the a,b,c
and d only...";
cout<<"\n\n\n";
cout<<"Which of the following type of class
allows only one object of it to be created ?";
cout<<"\n\n A.Virtual Class \n\n B.Abstract
Class \n\n C.Singleton Class \n\n D.Friend Class";
cout<<"\n\n Enter Your Select answer : ";
cin>>ch1;
if(ch1=='c')
{
x=x+1;
cout<<"\n\n Correct Answer....";

}
else
cout<<"\n\n Sorry Wrong Answer....";
getch();
cout<<"\n\n\n";
cout<<"Which of the following is not a type of
constructor ?";
cout<<"\n\n A.Copy Constructor \n\n B.Friend
Constructor \n\n C.Default Constructor \n\n
D.Parameterized Constructor";
cout<<"\n\n Enter Your Select answer : ";
cin>>ch1;
if(ch1=='b')
{
x=x+1;
cout<<"\n\n Correct Answer....";

}
else
cout<<"\n\n Sorry Wrong Answer..";
cout<<"\n\n\n";
cout<<"RunTime Polymorphism is achieved by___";
cout<<"\n\n A.Friend Function \n\n B.Operator
Overloading \n\n C.Function Overloading \n\n D.Virtual
Function";
cout<<"\n\n Enter Your Select answer : ";
cin>>ch1;
if(ch1=='d')
{
x=x+1;
cout<<"\n\n Correct Answer...";
}
else
cout<<"\n\n Sorry Wrong Answer....";
getch();
cout<<"\n\n\n";
cout<<"Which of the following cannot be used
with the Keyword 'Virtual' ?";
cout<<"\n\n A.Constructor \n\n B.Member function
\n\n C.Destructor \n\n D.Class";
cout<<"\n\n Enter Your Selected answer : ";
cin>>ch1;
if(ch1=='a')
{
x=x+1;
cout<<"\n\n Correct Answer.....";
}
else
cout<<"\n\n Sorry Wrong Answer....";
getch();
cout<<"\n\n\n";
cout<<"Which of the following is not a type of
inheritance ?";
cout<<"\n\n A.Multiple \n\n B.Distributive \n\n
C.Multilevel \n\n D.Hierarchical";
cout<<"\n\n Enter Your Select answer : ";
cin>>ch1;

if(ch1=='b')
{
x=x+1;
cout<<"\n\n Correct Answer...";
}
else
cout<<"\n\n Sorry Wrong Answer....";
getch();
cout<<"\n\n\n";
cout<<"Which of the following is an invalid
visibility label while inheriting a class";
cout<<"\n\n A.Public \n\n B.Private \n\n
C.Friend \n\n D.Protected";
cout<<"\n\n Enter Your Select answer : ";
cin>>ch1;

if(ch1=='c')
{
x=x+1;
cout<<"\n\n Correct Answer...";
}
else

cout<<"\n\n Sorry Wrong Answer....";


cout<<"\n\n Enter Your Choice :--> ";
cin>>n;

case 2:

if(x==50)
cout<<"\n\n Congratulations......You are
extremely intelligent";
else if(x<=50)
cout<<"\n Total Score is : "<<x;
cout<<"\n\n Enter Your Choice :--> ";
cin>>n;

case 3:
int reply;
cout<<"\n\n Are Sure you want to exit quiz ? Y/N
:";
cin>>reply;
if(reply=='Y')
{
goto out;
}
}
out:
getch();
}
Output
Bibliography
 http://www.cplusplus.com
 https://www.geeksforgeeks.org/

 Help From teachers


 Help From Books (Sumita Arora)
Remarks

Вам также может понравиться