You are on page 1of 37

#include<stdio.

h>
#include<conio.h>
#include<stdlib.h>

/*variables*/
int ans;
int cat;
int score;
/*initializing of functions*/
int solsys();
int music();
int bio();
int history();
int cprog();
int ref();
int mainmenu();

/*first page*/
int main ()
{
system("cls");
printf("Welcome to Who Wants to Win the Questionnaire! \n");
printf("For every correct answer you make you win 100,000 worth of score. \n");
printf("The highest score you can get is 1,000,000. \n The higher your score is, the
more knowledgeable you are on the particular subject. \n");
printf("Come and play the quiz game to see how knowledgeable you are. \n");
system("pause");
mainmenu();
}

/*main menu*/
mainmenu ()
{
system("cls");
printf("Categories \n");
printf("[1]Solar System \n");
printf("[2]Music \n");
printf("[3]History \n");
printf("[4]Biology \n");
printf("[5]Computer Programming \n");
printf("[6]References \n");
printf("[0]Exit Program \n");
printf("Enter Choice:");
scanf("%d", &cat);

/*category picker*/
switch(cat)
{
case 1:
solsys();
break;
case 2:
music();
break;

case 3:
history();
break;

case 4:
bio();
break;

case 5:
cprog();
break;

case 6:
ref();
break;

case 0:
return 0;

default:
system("cls");
mainmenu();
break;

}
}

/*references*/
ref ()
{
system("cls");
printf("Pick a category to see references \n");
printf("[1] Solar System \n");
printf("[2] Music \n");
printf("[3] Biology \n");
printf("[4] History \n");
printf("[5] Computer Programming \n");
printf("[0] Back to Main Menu \n");
printf("Enter Choice:");
scanf("%d", &ans);

switch(ans)
{
/*solsys*/
case 1:
system("cls");
printf("https://solarsystem.nasa.gov/solar-system/our-solar-
system/in-depth/ \n");
system("pause");
ref();
break;

/*music*/
case 2:
system("cls");
printf("http://mentalfloss.com/article/51566/11-fun-facts-about-
beatles \n");
printf("https://www.udiscovermusic.com/stories/beatles-45-fab-
facts/ \n");
printf("https://www.express.co.uk/life-style/top10facts/953061/jazz-
music-facts-International-Jazz-Day \n");
printf("http://mentalfloss.com/article/71222/20-things-you-might-
not-have-known-about-hamilton \n");
printf("http://www.contactmusic.com/panic-at-the-disco \n");
printf("https://www.classicfm.com/discover-music/latest/incredible-
facts/ \n");
system("pause");
ref();
break;

/*bio*/
case 3:
system("cls");
printf(" https://www.khanacademy.org/science/high-school-
biology/hs-biology-foundations/ \n hs-biology-and-the-scientific-method/v/overview-of-biology
\n ");

printf("https://www.khanacademy.org/science/biology/photosynthesis-in-plants \n ");
printf("https://www.khanacademy.org/science/biology/dna-as-the-
genetic-material/modal/e/nucleic-acids \n ");
printf("https://www.khanacademy.org/science/biology/chemistry--
of-life \n ");
printf("https://www.khanacademy.org/science/biology/cellular-
respiration-and-fermentation \n ");
printf("https://www.khanacademy.org/science/biology/structure-of-
a-cell \n ");

system("pause");
ref();
break;

/*history*/
case 4:
system("cls");
printf("https://www.khanacademy.org/humanities/us-history/rise-to-
world-power \n");
printf("https://www.timeanddate.com/holidays/us/independence-
day \n");
printf("https://www.natgeokids.com/nz/discover/geography/countries/30-cool-facts-about-
china/ \n");
printf("https://www.nasa.gov/mission_pages/apollo/apollo11.html
\n");
printf("https://www.history.com/this-day-in-history/first-man-in-
space \n");
printf("https://www.britannica.com/biography/Hannibal-
Carthaginian-general-247-183-BC#ref219465 \n");
system("pause");
ref();
break;

/*cprog*/
case 5:
system("cls");
printf("https://www.sololearn.com/Course/C");

system("pause");
ref();
break;

/*back to main menu*/


case 0:
mainmenu();
break;
}
}

/*solar system category*/


solsys ()
{
/*q1*/
system("cls");
printf("In which solar system are our planet in? \n");
printf(" [1] Reese \n [2] Mars \n [3] Three Musketeers \n [4] Milky Way \n [0] Back
main menu \n ");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 4)
{
/*q2*/
score = 0 + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");
printf("What do we call our star? \n");
printf(" [1] The Star \n [2] Our Star \n [3] Our Tsar \n [4] Sun \n [0] Back to
main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 4)
{
/*q3*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);;
system("pause");
system("cls");
printf("How many known moons in our solar system? \n");
printf(" [1] 150 \n [2] 20 \n [3] 200 \n [4] 50 \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 1)
{
/*q4*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");
printf("Which of these planets are terrestrial planets? \n");
printf(" [1] Jupiter \n [2] Mercury \n [3] Uranus \n [4] Saturn \n [0]
Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 2)
{
/*q5*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");
printf(" What makes a planet a terrestrial planet? \n ");
printf("[1] Made of gas and light \n [2] Small with rocky
surfaces \n [3] Made of liquid and minerals \n [4] None of the above \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 2)
{
/*q6*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");
printf("Which of these aren't a terrestrial planet? \n");
printf(" [1] Neptune \n [2] Earth \n [3] Mars \n [4]
Venus \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 1)
{
/*q7*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n",
score);
system("pause");
system("cls");
printf("Which of the 8 planets that ha no moons? \n");
printf(" [1] Pluto and Neptune \n [2] Jupiter and Saturn
\n [3] Earth and Mars \n [4] Mercury and Venus \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 4)
{
/*q8*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d
\n", score);
system("pause");
system("cls");
printf("Which planet is smaller than our own
moon but has 5 moons in orbit?\n");
printf(" [1] Earth \n [2] Mercury \n [3] Mars \n
[4] Pluto \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if(ans == 4)
{
/*q9*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score
is %d \n", score);
system("pause");
system("cls");
printf("What is a heliosphere? \n");
printf(" [1] A solar wind \n [2] An energy
that is emitted by a volcanic eruption \n [3] A stream of electricaly charged gas \n [4] None of the
above \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 3)
{
/*q10*/
score = score + 100000;
system("cls");
printf("Its correct!
\n ");
printf("Your
current score is %d \n", score);
system("pause");
system("cls");
printf("How many known planets
are in our solar system? \n");
printf(" [1] Nine \n [2] Twelve \n
[3] Eight \n [4] Fourteen \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 3)
{
/*You Won
part*/
score = score + 100000;
system("cls");
printf("Its correct! \n");
printf("Your Final score is
%d \n", score);
printf("You
won the Solar System quiz! \n");
system("pause");
mainmenu();
}
else if (ans
== 0)
{

mainmenu();
}
else
{
/*q10
game over*/

system("cls");
printf("Game over!");

printf("Your score is %d \n", score);

system("pause");

mainmenu();
}
}
else if (ans == 0)
{

mainmenu();
}
else
{
/*q9 game over*/
system("cls");
printf("Game
over!");
printf("Your score
is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q8 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d
\n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q7 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q6 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q5 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q4 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q3 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q2 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q1 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}

music ()
{
/*q1*/
system("cls");
printf("What's the real name of Ringo of The Beatles? \n");
printf(" [1] Baltazar Starkey \n [2] Richard Starkey \n [3] Ricky Starkey \n [4] Star
Starkey \n [0] Back main menu \n ");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 2)
{
/*q2*/
score = 0 + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");
printf("Who played the keyboard on almost all the albums of The Beatles?
\n");
printf(" [1] McCartney \n [2] Ringo \n [3] John Lenon \n [4] George Martin \n
[0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 4)
{
/*q3*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);;
system("pause");
system("cls");
printf("Who said'if you have to ask what Jazz is, you'll never know'?
\n");
printf(" [1] Louis Armstrong \n [2] Neil Armstrong \n [3] Julie Armstrong \n [4]
none of the above \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 1)
{
/*q4*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");
printf("In 1913 what is jazz used to mean? \n");
printf(" [1] Nonesense \n [2] Babble \n [3] Music \n [4] 1 and 2 \n [0]
Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 4)
{
/*q5*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");
printf("Hamilton The Musical started as a mixtape.
True or false? \n ");
printf(" [1] False \n [2] True \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 2)
{
/*q6*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");
printf("How long did Miranda took to write the
firstsong of Hamilton? \n");
printf(" [1] 1 year \n [2] 2 months \n [3] 5 months \n
[4] 1 week \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 1)
{
/*q7*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n",
score);
system("pause");
system("cls");
printf("When did the Panic At The Disco Started? \n");
printf(" [1] 2010 \n [2] 1991 \n [3] 2004 \n [4] 1890 \n
[0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 3)
{
/*q8*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d
\n", score);
system("pause");
system("cls");
printf("Brendon Urie said that 'he's not worthy'
to knock David Bowie off Top Charts. True or False? \n");
printf(" [1] True \n [2] False \n [0] Back to main
menu \n");
printf("Your answer:");
scanf("%d", &ans);

if(ans == 1)
{
/*q9*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score
is %d \n", score);
system("pause");
system("cls");
printf("How many invdividual pieces of
wood does a violin usually have? \n");
printf(" [1] Around 4 \n [2] Less than 60
\n [3] Over 70 \n [4] None of the above \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 3)
{
/*q10*/
score = score + 100000;
system("cls");
printf("Its correct!
\n ");
printf("Your
current score is %d \n", score);
system("pause");
system("cls");
printf("The London Symphony
Orchestra was booked to travel on the Titanic's maiden voyage, \n but they changed boats at the
last minute. \n True or False? \n");
printf(" [1] False \n [2] True \n
[0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 2)
{
/*You Won
part*/
score = score + 100000;
system("cls");
printf("Its correct! \n");
printf("Your Final score is
%d \n", score);
printf("You won the
Music quiz!");
system("pause");
mainmenu();
}
else if (ans
== 0)
{

mainmenu();
}
else
{
/*q10
game over*/

system("cls");

printf("Game over!");

printf("Your score is %d \n", score);

system("pause");

mainmenu();
}
}
else if (ans == 0)
{

mainmenu();
}
else
{
/*q9 game over*/
system("cls");
printf("Game
over!");
printf("Your score
is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q8 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d
\n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q7 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q6 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q5 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q4 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q3 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q2 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q1 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
history ()
{
/*q1*/
system("cls");
printf("How many states are there in USA? \n");
printf(" [1] 50 \n [2] 25 \n [3] 60 \n [4] 45 \n [0] Back main menu \n ");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 1)
{
/*q2*/
score = 0 + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");
printf("Hannibal's father is from what city? \n");
printf(" [1] Madrid \n [2] Lisbon \n [3] Antwerp \n [4] Carthage \n [0] Back to
main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 4)
{
/*q3*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);;
system("pause");
system("cls");
printf("What is Hannibal of Carthage known for? \n");
printf(" [1] Military General \n [2] Painter \n [3] Serial Killer \n [4] none of the
above \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 1)
{
/*q4*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");
printf("When is the Independence Day os the USA? \n");
printf(" [1] 24th April, 1805 \n [2] 4th July, 1776 \n [3] 8th May, 1698
\n [4] none of the above \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 2)
{
/*q5*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");
printf("How many official time zones are there in the
USA? \n ");
printf("[1] 1 \n [2] 3 \n [3] 4 \n [4] None of the above \n [0]
Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 3)
{
/*q6*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");
printf("China is as big as the USA, but only has one
official time zone. True or False? \n");
printf(" [1] True \n [2] False \n [0] Back to main menu
\n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 1)
{
/*q7*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n",
score);
system("pause");
system("cls");
printf("When was the first time that man landed on the
moon? \n");
printf(" [1] May 4, 1994 \n [2] August 20, 2000 \n [3]
March 10, 2012 \n [4] July 20, 1969 \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);
if (ans == 4)
{
/*q8*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d
\n", score);
system("pause");
system("cls");
printf("Who's the first man on the moon? \n");
printf(" [1] Neil Armstrong \n [2] Yuri Gargarin
\n [3] Tom Hanks \n [4] none of the above \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if(ans == 4)
{
/*q9*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score
is %d \n", score);
system("pause");
system("cls");
printf("Which country was the first to
launch a man into outer space? \n");
printf(" [1] USSR \n [2] USA \n [3] Russia
\n [4] None of the above \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 1)
{
/*q10*/
score = score + 100000;
system("cls");
printf("Its correct!
\n ");
printf("Your
current score is %d \n", score);
system("pause");
system("cls");
printf("Who's the first man that
is sent into outer space? \n");
printf("[1] Neil Armstrong [2]
Albert II [3] Yuri Gargarin [4] Laika [0] Back to main menu \n");
scanf("%d", &ans);

if (ans == 3)
{
/*You Won
part*/
score = score + 100000;
system("cls");
printf("Its correct! \n");
printf("Your Final score is
%d \n", score);
printf("You won the
History quiz!");
system("pause");
mainmenu();
}
else if (ans
== 0)
{

mainmenu();
}
else
{
/*q10
game over*/

system("cls");

printf("Game over!");

printf("Your score is %d \n", score);

system("pause");

mainmenu();
}
}
else if (ans == 0)
{

mainmenu();
}
else
{
/*q9 game over*/
system("cls");
printf("Game
over!");
printf("Your score
is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q8 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d
\n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q7 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q6 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q5 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q4 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q3 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q2 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q1 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}

bio ()
{
/*q1*/
system("cls");
printf("What is Biology? \n");
printf(" [1] Study of things \n [2] Study of Electricity \n [3] Study of life \n [4] Study of
relativity \n [0] Back main menu \n ");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 3)
{
/*q2*/
score = 0 + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");
printf("What are living things? \n");
printf(" [1] They convert energy to one form to another \n [2] They use
energy to reproduce \n [3] They use energy to change \n [4] All of the above \n [0] Back to main
menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 4)
{
/*q3*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);;
system("pause");
system("cls");
printf("What organelle is the site of photosynthesis in plants? \n");
printf(" [1] Mitochondria \n [2] Ribosomes \n [3] Chloroplasts \n [4]
Cytoplasm \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 3)
{
/*q4*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");

printf("Which of the following are true regarding photosynthesis and


cellular respiration? \n");
printf(" [1] Photosynthesis produces carbon dioxide, and cellular
respiration uses carbon dioxide. \n ");
printf(" [2] Photosynthesis and cellular respiration are performed by
all plants and animals. \n ");
printf(" [3] Both photosynthesis and cellular respiration occur in the
chloroplasts of a cell. \n ");
printf(" [4] Photsynthesis and cellular respiration are near-opposite
processes. \n ");
printf(" [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 4)
{
/*q5*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");

printf("Which of the following statements is true


regarding anabolism? \n ");
printf(" [1] Energy is released during anabolic reactions. \n ");
printf(" [2] In anabolism, larger molecules are made
from smaller molecules. \n ");
printf(" [3] Anabolism is the sum of all the chemical
reactions in a cell. \n ");
printf(" [4] Anabolism uses the process of hydrolysis to
join molecules together. \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 2)
{
/*q6*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");

printf("What is the relationship between anabolic and


catabolic pathways? \n");
printf(" [1] Catabolic pathways synthesize complex
molecules that are destroyed by anabolism. \n ");
printf(" [2] Anabolic and catabolic pathways are
interchangeable. \n ");
printf(" [3] Anabolic pathways create complex
molecules using the energy from catabolic pathways. \n ");
printf(" [4] Molecules broken down by anabolic
pathways provides energy for catabolic pathways. \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 3)
{
/*q7*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n",
score);
system("pause");
system("cls");

printf("In a sample of double-stranded DNA, 30 percent


of the nitrogenous bases are guanine (G). \n");
printf("What percentage of the
nitrogenous bases in the sample are adenine (A)?\n ");
printf(" [1] 80 percent \n ");
printf(" [2] 30 percent \n ");
printf(" [3] 20 percent \n ");
printf(" [4] 70 percent \n [0] Back to
main menu \n");

printf("Your answer:");
scanf("%d", &ans);

if (ans == 3)
{
/*q8*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d
\n", score);
system("pause");
system("cls");
printf("DNA replication produces a new
strand of DNA that is complementary to the \n");
printf("parent strand. The parent
strand's sequence is ' GGCATCGAG 3 '. \n");
printf("What is the sequence of
the complementary DNA strand? \n ");
printf(" [1] 5' CTCGATGCC 3' \n
");
printf(" [2] 5' GGCATCGAG 3' \n
");
printf(" [3] 5' GAGCTACGG 3' \n
");
printf(" [4] 5' CCGTAGCTC 3' \n
");
printf(" [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if(ans == 1)
{
/*q9*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score
is %d \n", score);
system("pause");
system("cls");

printf("What is the main


function of cytoplasm in a cell? \n ");
printf(" [1] Synthesizing
proteins in the cell \n ");
printf(" [2] Suspending
cellular structures and providing a place for cellular functions to take place \n ");
printf(" [3] Regulating the
transport of molecules into and out of the cell \n ");
printf(" [4] Packaging and
sending out proteins and lipids \n ");
printf(" [0] Back to main menu
\n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 2)
{
/*q10*/
score = score + 100000;
system("cls");
printf("Its correct!
\n ");
printf("Your
current score is %d \n", score);
system("pause");
system("cls");

printf("Which of the following


choices correctly describes the composition of the cell membrane? \n");
printf(" [1] Contains lipids and
proteins \n [2] Contains only lipids \n [3] Contains only proteins \n [4] Contains lipids and cytosol \n
[0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 1)
{
/*You Won
part*/
score = score + 100000;
system("cls");
printf("Its correct! \n");
printf("Your Final score is
%d \n", score);
printf("You won the
Biology quiz!");
system("pause");
mainmenu();
}
else if (ans
== 0)
{

mainmenu();
}
else
{
/*q10
game over*/

system("cls");

printf("Game over!");

printf("Your score is %d \n", score);

system("pause");

mainmenu();
}
}
else if (ans == 0)
{

mainmenu();
}
else
{
/*q9 game over*/
system("cls");
printf("Game
over!");
printf("Your score
is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q8 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d
\n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q7 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q6 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q5 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q4 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q3 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q2 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q1 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}

cprog ()
{
/*q1*/
system("cls");
printf("C is a: \n");
printf(" [1] Client-side scripting language \n [2] Photo editing program \n [3] General
purpose programming language \n [4] A kind of vitamin \n");
printf("[0] Back main menu \n ");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 3)
{
/*q2*/
score = 0 + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");

printf("Which line includes the <studio.h> header? \n");


printf(" [1] include .header \n [2] <header>stdio.h</header> \n [3]
#<studio.h> \n [4] #include <stdio.h> \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 4)
{
/*q3*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);;
system("pause");
system("cls");

printf("Which statement is used to output text or strings? \n");

printf(" [1] printf \n [2] cout >> \n [3] echo \n [4] alert \n [0] Back to main
menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 1)
{
/*q4*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");

printf("Which of the following are valid data types in C? \n");


printf(" [1] int, float, double, char \n [2] int, float, string, char \n [3]
int, double, char, boolean \n [4] int, bool, string \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 1)
{
/*q5*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");

printf(" We assign value to a variable using what


operator? \n ");
printf("[1] = \n [2] == \n [3] isset() \n [4] let \n [0] Back to
main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans = 2)
{
/*q6*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n", score);
system("pause");
system("cls");

printf("We declare a constant by adding which


keyword before the data type? \n");
printf(" [1] const \n [2] CONSTANT \n [3] setToConst \n
[4] valConst \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 1)
{
/*q7*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d \n",
score);
system("pause");
system("cls");

printf("The code \"char c = getchar();\" does what


exactly? \n");
printf(" [1] It gets the character from the variable c \n
[2] It stores the character 'c' \n [3] It declares c is getting c. \n [4] It reads a character from the input
and stores it in a variable called 'c' \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 4)
{
/*q8*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score is %d
\n", score);
system("pause");
system("cls");

puts("char c = \'s\';");
puts("______\(c\)\;");
puts("Fill in the blank to output the single
character \n");
printf(" [1] print\(c) \n [2] putchar \n [3] echo()
\n [4] std.write \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if(ans == 2)
{
/*q9*/
score = score + 100000;
system("cls");
printf("Its correct! \n ");
printf("Your current score
is %d \n", score);
system("pause");
system("cls");

puts("The following code


outputs what?");
puts(" \/* printf\(\"Hello world!\") \*/");
printf(" [1] Hello world! \n [2] It would
produce an error during compilation \n [3] Nothing \n [4] All of the above \n [0] Back to main menu
\n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 3)
{
/*q10*/
score = score + 100000;
system("cls");
printf("Its correct!
\n ");
printf("Your
current score is %d \n", score);
system("pause");
system("cls");

printf("Just like in Phyton, Java


and PHP, what are the common mistakes in programming? \n");
printf(" [1] Not ending
statements with the correct token \n [2] Improper nesting of code blocks \n [3] Expecting local
variables to work globally \n [4] All of the above \n [0] Back to main menu \n");
printf("Your answer:");
scanf("%d", &ans);

if (ans == 4)
{
/*You Won
part*/
score = score + 100000;
system("cls");
printf("Its correct! \n");
printf("Your Final score is
%d \n", score);
printf("You won the
Computer Programming quiz!");
system("pause");
mainmenu();
}
else if (ans
== 0)
{

mainmenu();
}
else
{
/*q10
game over*/

system("cls");

printf("Game over!");

printf("Your score is %d \n", score);

system("pause");

mainmenu();
}
}
else if (ans == 0)
{

mainmenu();
}
else
{
/*q9 game over*/
system("cls");
printf("Game
over!");
printf("Your score
is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q8 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d
\n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q7 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q6 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q5 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q4 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q3 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q2 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}
else if (ans == 0)
{
mainmenu();
}
else
{
/*q1 game over*/
system("cls");
printf("Game Over!");
printf("Your score is %d \n", score);
system("pause");
mainmenu();
}
}

You might also like