Micro Project Programming in C: Department of Computer Enineering
Micro Project Programming in C: Department of Computer Enineering
Engineering Nepti,
Ahmednagar
DEPARTMENT OF COMPUTER
ENINEERING
MICRO PROJECT
REPORT
IN
PROGRAMMING IN
C
FOR
2021-2022
1|Page
Shri Chhatrappati Shivaji Maharaj College of
Engineering Nepti,
Ahmednagar
CERTIFICATE
This is to certify that,
Chumbalkar Sarthak
Dahale Samarth
Dangde Suhas
have successfully completed the Project work entitled “Quiz game” under my supervision, in the
partial fulfillment of the requirements for the FY Diploma in subject PIC and the report submitted to
Faculty S.V.Dhamal for academic year 2021-2022.
Date :
Place: Shri Chhatrappati Shivaji Maharaj College of Engineering Nepti, Ahmednagar
2|Page
ACKNOWLEDGMENT
It is my great pleasure to present the honor and sincere gratitude to my guide -----------
---------------------- Lecturer,Shri Chhatrapatti Shivaji Maharaj polytechnic A.nagar helped in
joining the hands in developing each and every steps of this project and for valuable guidance
and constant encouragement during completion of project work. It was my privilege and
pleasure to work under his valuable guidance. I am indeed gratefully to him for providing me
helpful suggestions. Due to his constant encouragement and inspiration I could complete my
project work.
I am very thankful to Principal, Shri Chhatrappatti Shivaji Maharaj polytechnic A.nagar
My grateful thanks to Prof. Yashangali sisodia Head of Computer Department, for their
valuable guidance, support and constant encouragement.
I express thanks to my family and friends for their support and encouragement at every
stage of successful completion of this project work.
My sincere thank to all those who have directly or indirectly helped me to carry out
this work.
3|Page
Topic:- Quiz Game Using ‘C’
INDEX
1. Aim
2. Information
3. Code
4. Output
5. Conclusion
6. Reference
4|Page
Aim: –
Preparing a small project report on a Quiz game using C
language
5|Page
Code Used In This Project
#include<stdio.h>
#include<conio.h>
#include<ctype.h>
#include<stdlib.h>
#include<string.h>
void show_record();
void reset_score();
void help();
void edit_score(float , char []);
int main()
{
int countr,r,r1,count,i,n;
float score;
char choice;
char playername[20];
mainhome:
system("cls");
printf("\t\t\tC
PROGRAM QUIZ
GAME\n");
printf("\n\t\t
printf("\n\t\t\ WELCOME ");
");
t printf("\n\t\ to ");
t\t printf("\n\ THE GAME ");
t\t\t
printf("\n\t\t
"); printf("\n\t\t
"); printf("\n\t\t BECOME A MILLIONAIRE!!!!!!!!!!! ") ;
printf("\n\t\t
"); printf("\n\t\t
"); printf("\n\t\t > Press S to start the game");
printf("\n\t\t > Press V to view the highest score ");
printf("\n\t\t > Press R to reset score");
printf("\n\t\t > press H for help ");
printf("\n\t\t > press Q to quit ");
printf("\n\t\t \n\
n"); choice=toupper(getch());
6|Page
if (choice=='V')
{
show_record();
goto mainhome;
}
else if (choice=='H')
{
help();getch();
goto mainhome;
}
else if
(choice=='R')
{reset_score();
getch();
goto mainhome;}
else if (choice=='Q')
exit(1);
else if(choice=='S')
{
system("cls");
system("cls");
printf("\n ------------------ Welcome %s to C Program Quiz Game --------------------------
",playername);
printf("\n\n Here are some tips you might wanna know before
playing:"); printf("\n
");
printf("\n >> There are 2 rounds in this Quiz Game,WARMUP ROUND & CHALLANGE
ROUND");
printf("\n >> In warmup round you will be asked a total of 3 questions to test your");
printf("\n general knowledge. You are eligible to play the game if you give atleast
2"); printf("\nright answers, otherwise you can't proceed further to the Challenge
Round.");
printf("\n >> Your game starts with CHALLANGE ROUND. In this round you will be asked
a"); printf("\n total of 10 questions. Each right answer will be awarded $100,000!");
printf("\n By this way you can win upto ONE MILLION cash prize!!!!!..........");
printf("\n >> You will be given 4 options and you have to press A, B ,C or D for the");
printf("\n right option.");
printf("\n >> You will be asked questions continuously, till right answers are 7|Page
given");
printf("\n >> No negative marking for wrong answers!");
printf("\n\n\t!!!!!!!!!!!!! ALL THE BEST !!!!!!!!!!!!!");
printf("\n\n\n Press Y to start the game!\n");
printf("\n Press any other key to return to the main menu!");
if (toupper(getch())=='Y')
{
goto home;
}
else
{
goto mainhome;
system("cls");
}
home:
system("cls");
count=0;
for(i=1;i<=3;i+
+)
{
system("cls")
; r1=i;
switch(r1)
{
case 1:
printf("\n\nWhich of the following is a Palindrome number?");
printf("\n\nA.42042\t\tB.101010\n\nC.23232\t\tD.01234");
if (toupper(getch())=='C')
{
printf("\n\nCorrect!!!");count++;
getch();
break;
}
else
{
printf("\n\nWrong!!! The correct answer is C.23232");
getch();
break;
}
8|Page
case 2:
printf("\n\n\nThe country with the highest environmental performance index is...");
printf("\n\nA.France\t\tB.Denmark\n\nC.Switzerland\t\tD.Finland");
if (toupper(getch())=='C')
{printf("\n\nCorrect!!!");count++;
getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is C.Switzerland");
getch();
break;}
case 3:
printf("\n\n\nWhich animal laughs like human being?"); printf("\n\
nA.Polar Bear\t\tB.Hyena\n\nC.Donkey\t\tD.Chimpanzee"); if
(toupper(getch())=='B')
{printf("\n\nCorrect!!!");count++;
getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is B.Hyena");
getch();
break;}
case 4:
printf("\n\n\nWho was awarded the youngest player award
in Fifa World Cup
2006?");
printf("\n\nA.Wayne Rooney\t\tB.Lucas Podolski\n\
nC.Lionel Messi\t\tD.Christiano
Ronaldo");
if (toupper(getch())=='B')
{printf("\n\nCorrect!!!");count++;
getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is B.Lucas Podolski");
getch();
break;}
case 5: 9|Page
printf("\n\n\nWhich is the third highest mountain in the world?");
printf("\n\nA.Mt. K2\t\tB.Mt. Kanchanjungha\n\nC.Mt. Makalu\t\tD.Mt. Kilimanjaro");
if (toupper(getch())=='B')
{printf("\n\nCorrect!!!");count++;
getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is B.Mt. Kanchanjungha");
getch();
break;}
case 6:
printf("\n\n\nWhat is the group of frogs known as?"); printf("\n\
nA.A traffic\t\tB.A toddler\n\nC.A police\t\tD.An Army"); if
(toupper(getch())=='D' )
{printf("\n\nCorrect!!!");count++;
getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is D.An Army");
getch();
break;}}
}
if(count>=2)
{goto test;}
else
{
system("cls
");
printf("\n\nSORRY YOU ARE NOT ELIGIBLE TO PLAY THIS GAME, BETTER LUCK
NEXT TIME");
getch();
goto mainhome;
}
test:
system("cls");
printf("\n\n\t*** CONGRATULATION %s you are eligible to play the Game
***",playername); printf("\n\n\n\n\t!Press any key to Start the Game!");
if(toupper(getch())=='p')
{goto game;}
10 | P a g e
game:
countr=0;
for(i=1;i<=10;i+
+)
{system("cls")
; r=i;
switch(r)
{
ca
se
1:
printf("\n\nWhat is the National Game of England?"); printf("\n\
nA.Football\t\tB.Basketball\n\nC.Cricket\t\tD.Baseball"); if
(toupper(getch())=='C')
{printf("\n\nCorrect!!!");countr++;getch();
break;getch();}
else
{printf("\n\nWrong!!! The correct answer is C.Cricket");getch();
goto score;
break;}
case 2:
printf("\n\n\nStudy of Earthquake is called............,");
printf("\n\nA.Seismology\t\tB.Cosmology\n\nC.Orology\t\tD.Etimology");
if (toupper(getch())=='A')
{printf("\n\nCorrect!!!");countr++;getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is A.Seismology");getch();
goto score;
break;
}
case 3:
printf("\n\n\nAmong the top 10 highest peaks in the world, how many
lie in Nepal?
");
printf("\n\nA.6\t\tB.7\n\nC.8\t\
tD.9"); if (toupper(getch())=='C')
{printf("\n\nCorrect!!!");countr++;getch();
break;} 11 | P a g e
else
{printf("\n\nWrong!!! The correct answer is
C.8");getch();
goto score;
break;}
case 4:
printf("\n\n\nThe Laws of Electromagnetic Induction were given by?");
printf("\n\nA.Faraday\t\tB.Tesla\n\nC.Maxwell\t\tD.Coulomb");
if (toupper(getch())=='A')
{printf("\n\nCorrect!!!");countr++;getch();
break;}
else
{
printf("\n\nWrong!!! The correct answer is A.Faraday");getch();
goto score;
break;
}
case 5:
printf("\n\n\nIn what unit is electric power measured?"); printf("\n\
nA.Coulomb\t\tB.Watt\n\nC.Power\t\tD.Units"); if
(toupper(getch())=='B')
{printf("\n\nCorrect!!!");countr++;getch(); break;}
else
{
printf("\n\nWrong!!! The correct answer is B.Power");
getch();
goto
score;
break;
}
case 6:
printf("\n\n\nWhich element is found in Vitamin
B12?"); printf("\n\nA.Zinc\t\tB.Cobalt\n\nC.Calcium\t\
tD.Iron"); if (toupper(getch())=='B' )
{printf("\n\nCorrect!!!");countr++;getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is B.Cobalt");goto score;
getch();
break;}
12 | P a g e
case 7:
printf("\n\n\nWhat is the National Name of Japan?");
printf("\n\nA.Polska\t\tB.Hellas\n\nC.Drukyul\t\tD.Nippon");
if (toupper(getch())=='D')
{printf("\n\nCorrect!!!");countr++;getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is D.Nippon");getch();
goto score;
break;}
case 8:
printf("\n\n\nHow many times a piece of paper can be folded at the most?");
printf("\n\nA.6\t\tB.7\n\nC.8\t\tD.Depends on the size of paper");
if (toupper(getch())=='B')
{printf("\n\nCorrect!!!");countr++;getch(); break;}
else
{printf("\n\nWrong!!! The correct answer is B.7");getch();
goto score;
break;}
case 9:
printf("\n\n\nWhat is the capital of Denmark?"); printf("\n\
nA.Copenhagen\t\tB.Helsinki\n\nC.Ajax\t\tD.Galatasaray"); if
(toupper(getch())=='A')
{printf("\n\nCorrect!!!");countr++; getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is A.Copenhagen");getch();
goto score;
break;}
case 10:
printf("\n\n\nWhich is the longest River in the world?");
printf("\n\nA.Nile\t\tB.Koshi\n\nC.Ganga\t\tD.Amazon");
if (toupper(getch())=='A')
{printf("\n\nCorrect!!!");countr++;getch();
break;}
else
13 | P a g e
{printf("\n\nWrong!!! The correct answer is A.Nile");getch();break;goto score;}
case 11:
printf("\n\n\nWhat is the color of the Black Box in aeroplanes?");
printf("\n\nA.White\t\tB.Black\n\nC.Orange\t\tD.Red");
if (toupper(getch())=='C')
{printf("\n\nCorrect!!!");countr++;getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is C.Orange");getch();
break;goto score;}
case 12:
printf("\n\n\nWhich city is known at 'The City of Seven Hills'?");
printf("\n\nA.Rome\t\tB.Vactican City\n\nC.Madrid\t\tD.Berlin");
if (toupper(getch())=='A')
{printf("\n\nCorrect!!!");countr++;getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is A.Rome");getch();
break;goto score;}
case 13:
printf("\n\n\nName the country where there no mosquitoes are found?");
printf("\n\nA.Japan\t\tB.Italy\n\nC.Argentina\t\tD.France");
if (toupper(getch())=='D')
{printf("\n\nCorrect!!!");countr++;getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is D.France");getch();
break;goto score;}
case 14:
printf("\n\n\nWho is the author of 'Pulpasa Cafe'?"); printf("\
n\nA.Narayan Wagle\t\tB.Lal Gopal Subedi\n\nC.B.P.
Koirala\t\tD.Khagendra Sangraula");
if (toupper(getch())=='A')
{printf("\n\nCorrect!!!");countr++;getch();
break;}
else
14 | P a g e
{printf("\n\nWrong!!! The correct answer is A.Narayan Wagle");getch();
break;goto score;}
case 15:
printf("\n\n\nWhich Blood Group is known as the Universal Recipient?");
printf("\n\nA.A\t\tB.AB\n\nC.B\t\tD.O");
if (toupper(getch())=='B')
{printf("\n\nCorrect!!!");countr++;getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is B.AB");getch();
goto score;
break;}
case 16:
printf("\n\n\nWhat is the unit of measurement of distance between Stars?");
printf("\n\nA.Light Year\t\tB.Coulomb\n\nC.Nautical Mile\t\tD.Kilometer");
if (toupper(getch())=='A')
{printf("\n\nCorrect!!!");countr++; getch();
break;
}
else
{printf("\n\nWrong!!! The correct answer is A.Light Year");getch();
goto score;
break;}
case 17:
printf("\n\n\nThe country famous for Samba Dance is........");
printf("\n\nA.Brazil\t\tB.Venezuela\n\nC.Nigeria\t\tD.Bolivia");
if (toupper(getch())=='A')
{printf("\n\nCorrect!!!");countr++; getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is A.Brazil");getch();goto score;
break;}
case 18:
printf("\n\n\nWind speed is measure by ?");
15 | P a g e
printf("\n\nA.Lysimeter\t\tB.Air vane\n\nC.Hydrometer\t\tD.Anemometer\n\n");
if (toupper(getch())=='D')
{printf("\n\nCorrect!!!");countr++; getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is D.Anemometer");getch();goto score;
break;}
case 19:
printf("\n\n\nWhich city in the world is popularly known as The City of Temple?");
printf("\n\nA.Delhi\tB.Bhaktapur\n\nC.Kathmandu\tD.Agra\n\n");
if (toupper(getch())=='C')
{printf("\n\nCorrect!!!");countr++; getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is C.Kathmandu");getch();goto score;
break;}
case 20:
printf("\n\n\nWhich hardware was used in the First Generation Computer?");
printf("\n\nA.Transistor\t\tB.Valves\n\nC.I.C\t\tD.S.S.I");
if (toupper(getch())=='B')
{printf("\n\nCorrect!!!");countr++; getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is B.Valves");getch();goto score;
break;}
case 21:
printf("\n\n\nOzone plate is being destroyed regularly because of
?"); printf("\n\nA.L.P.G\t\tB.Nitrogen\n\nC.Methane\t\tD. C.F.C");
if (toupper(getch())=='D')
{printf("\n\nCorrect!!!");countr++; getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is D. C.F.C");getch();goto score;
break;}
case 22:
16 | P a g e
printf("\n\n\nWho won the Women's Australian Open Tennis in 2007?");
printf("\n\nA.Martina Hingis\t\tB.Maria Sarapova\n\nC.Kim Clijster\t\tD.Serena
Williams");
if (toupper(getch())=='D')
{printf("\n\nCorrect!!!");countr++; getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is
D.Serena Williams");getch();goto
score;
break;}
case 23:
printf("\n\n\nWhich film was awarded the Best Motion Picture at Oscar in 2010?");
printf("\n\nA.The Secret in their Eyes\t\tB.Shutter Island\n\nC.The King's
Speech\t\tD.The Reader");
if (toupper(getch())=='C')
{printf("\n\nCorrect!!!");countr++; getch();
break;}
else
{printf("\n\nWrong!!! The correct answer is
C.The King's Speech");getch();goto
score;
break;}}}
score:
system("cls")
;
sc
ore=(flo
at)count
r*10000
0;
if(
score>0.
00 &&
score<1
000000)
{
printf("\n\n\t\t**************** CONGRATULATION *****************");
printf("\n\t You won $%.2f",score);goto go;}
else if(score==1000000.00)
{
printf("\n\n\n \t\t**************** CONGRATULATION ****************");
printf("\n\t\t\t\t YOU ARE A MILLIONAIRE!!!!!!!!!"); 17 | P a g e
printf("\n\t\t You won $%.2f",score);
printf("\t\t Thank You!!");
printf("\n\t\t Thanks for your participation");
printf("\n\t\t TRY AGAIN");goto go;}
go:
puts("\n\n Press Y if you want to play next game");
puts(" Press any key if you want to go main menu");
if (toupper(getch())=='Y')
goto home;
else
{
edit_score(score,playername);
goto mainhome;}}}
voi
d
sho
w_
rec
ord
()
{sys
tem
("cl
s");
char name[20];
float scr;
FILE *f;
f=fopen("score.txt","r");
fscanf(f,"%s%f",&name,&scr);
printf("\n\n\t\
t************************
*************************
************");
printf("\n\n\t\t %s has secured the Highest Score %0.2f",name,scr); printf("\n\n\t\
t*************************************************************"); fclose(f);
getch();}
void reset_score()
{system("cls")
; float sc;
char nm[20];
FILE *f;
f=fopen("sco
re.txt","r+");
18 | P a g e
fscanf(f,"%s%f",&nm,&sc);
sc=0;
fprintf(f,"%s,%.2f",nm,sc);
printf("\n\n HELP");
printf("\n
"); printf("\n ......................... C program Quiz Game...........");
printf("\n >> There are two rounds in the game, WARMUP ROUND & CHALLANGE ROUND");
printf("\n >> In warmup round you will be asked a total of 3 questions to test your general");
printf("\n knowledge. You will be eligible to play the game if you can give atleast 2");
printf("\n right answers otherwise you can't play the Game...........");
printf("\n >> Your game starts with the CHALLANGE ROUND. In this round you will be asked");
printf("\n total 10 questions each right answer will be awarded $100,000.");
printf("\n By this way you can win upto ONE MILLION cash prize in
USD..............."); printf("\n >> You will be given 4 options and you have to press A,
B ,C or D for the"); printf("\n right option");
printf("\n >> You will be asked questions continuously if you keep giving the right answers.");
printf("\n >> No negative marking for wrong answers");
printf("\n\n\t*********************BEST OF
LUCK*********************************");
printf("\n\n\t*****C PROGRAM QUIZ GAME is developed by CODE WITH C
TEAM********");}
19 | P a g e
O/P
This is the main homepage of the game. As per instruction press ‘S’ to
start the game After that…..
20 | P a g e
Again you will get instruction about the game. If you want to continue
or start the game press ‘Y’ otherwise if you want to exit then press the
any key…
After that your game will start then choose correct ans if ans is
correct you will get a next question otherwise this message will get…
21 | P a g e
The user is asked a total of three simple questions and they must be
able to answer at least two of them correctly to enter the next round. If
the user is not capable of doing that, he is not permitted to proceed
further….
If you win the round you will Enter the main game. To start, Press any
key…
22 | P a g e
The second round starts…
After the giving all answers your marks will be get count and as per
the marks you will get the cash price. Here cash price shown for only
entertainment….
***************************** END******************************
23 | P a g e
CONCLUSION
From this projectwe got a knowledge about all function used in C.
also learn to developing the program, from this project our logic
development were increased. Also learn to use of all function..
Action plan:
Planned
Sr.no Details of activity Planned Name of Responsible
Finish
start date Team Member
date
24 | P a g e
Resources Required:
1 Dev C Software 1 -
Name of Program…………………………Semester:……………………………….
…………………………………………………………………………………
………………
…………………………………………………………………………………
………………
…………………………………………………………………………………
………………
………………
25 | P a g e
Process Assessment Product Assessment
Total
Part A- Project Part B-Project Individual Marks
Project Methodology Report/Working Model Presentation/Viv 10
Proposal (2 mark) (2 marks) a (4 mark)
(2
marks)
2 Literature survey/
Information Collection
3 Project Proposal
6 Quality of
Prototype/Mode
l
7 Report Preparation
8 Presentation
9 Defence
26 | P a g e
Note:
Every course teacher is expected to assign marks for group evolution in first 3 columns &
individual evaluation in 4th columns for each group of students as per rubrics.
…………………………………………………………………………………………………………
…
…………………………………………………………………………………………………………
…
…………………………………………………………………………………………………………
…
…………………………………………………………………………………………………………
…
…………………………………………………………………………………………………………
…
…………………………………………………………………………………………………………
Any
… other comment:
………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
………………
Signature...................................................................
27 | P a g e