KAUN BANEGA CROREPATI Game Program in C


#include
#include

void question1();
void main()
{
clrscr();

printf("\n\n\n\n\n\n\t\t\t\t ______________\
\n\t\t\t\t | Hello And WELCOME TO\t|\
\t\t\t\t\t\t\t | KAUN BANEGA\t|\
\t\t\t\t\t\t\t | CROREPATI\t|\
\n\t\t\t\t |______________|\n");
getche();
question1();
getch();
}
char a,b,c,d,A,B,C,D,ans;
void question2();
void question1()
{
clrscr();
fflush(stdin);
printf("\nQ1.What does AC and DC stand for in the electrical field?");
printf("\n A. A Rock Band from Australia\t B. Alternating Current and Direct Current");

printf("\n C. Average Current\t and Discharged Capacitor\
\nD. Atlantic City and District of Columbia ");
scanf("%c",&ans);
switch(ans)
{
case 'A':
case 'a':
case 'C':
case 'c':
case 'D':
case 'd':
printf("\n\nWRONG ANSWER!!");
break;
case 'B':
case 'b':
printf("\n\nCORRECT ANSWER!!");
printf("\n\nYOU WON Rs.1,000!!");
break;
default:
printf("\n\nIMPROPER CHOICE!!");
}

if(ans == 'B' || ans == 'b')
{
getche();
clrscr();
question2();
}
}
void question3();
void question2()
{
clrscr();
fflush(stdin);

printf("\nQ2. Sometimes computers and cash registers in a foodmart are connected to a UPS system. What does UPS mean?");
printf("\nA. United Parcel Service \t B. Uniform Product Support");
printf("\nC. Under Paneling Storage\t D.Uninterruptable Power Supply");
scanf("%c",&ans);
switch(ans)
{
case 'A':
case 'a':
case 'B':
case 'b':
case 'C':
case 'c':
printf("\n\nWRONG ANSWER!!");
break;
case 'D':
case 'd':
{
printf("\n\nCORRECT ANSWER!!");
printf("\n\nYOU WON Rs.2,000!!");
}
break;
default:
printf("\n\nIMPROPER CHOICE!!");
}

if(ans == 'D' || ans == 'd')
{
getche();
clrscr();
question3();
}

}
void question4();
void question3()
{
clrscr();
fflush(stdin);

printf("Q3.Who is the author of Hamlet?");
printf("\nA. Christopher Marlowe\t B. William Shakespeare");
printf("\nC. Geoffrey Chaucer\\t D. Edith Wharton");
scanf("%c",&ans);
switch(ans)
{
case 'A':
case 'a':
case 'C':
case 'c':
case 'D':
case 'd':
printf("\n\nWRONG ANSWER!!");
break;
case 'B':
case 'b':
{
printf("\n\nCORRECT ANSWER!!");
printf("\n\nYOU WON Rs.3,000!!");
}
break;
default:
printf("\n\nIMPROPER CHOICE!!");
}
if(ans == 'B' || ans == 'b')
{
getche();
clrscr();
question4();
}

}
void question5();
void question4()
{
clrscr();
fflush(stdin);

printf("Q4.What frequency range is the High Frequency band?");
printf("\nA. 100 kHz\tB. 1GHz");
printf("\nC. 30 to 300 MHz\t D. 3 to 30 MHz");
scanf("%c",&ans);
switch(ans)
{
case 'A':
case 'a':
case 'B':
case 'b':
case 'C':
case 'c':
printf("\n\nWRONG ANSWER!!");
break;
case 'D':
case 'd':
{
printf("\n\nCORRECT ANSWER!!");
printf("\n\nYOU WON Rs.5,000!!");
}
break;
default:
printf("\n\nIMPROPER CHOICE!!");
}
if(ans == 'D' || ans == 'd')
{
getche();
clrscr();
question5();
}

}
void question6();
void question5()
{
clrscr();
fflush(stdin);
printf("Q5.What does EPROM stand for?");
printf("\nA. Electric Programmable Read Only Memory\
\n B. Erasable Programmable Read Only Memory")

printf("\n| C. Evaluable Philotic Random Optic Memory \
\n D. Every Person Requires One Mind\t\t\t|");
scanf("%c",&ans);
switch(ans)
{
case 'A':
case 'a':
case 'C':
case 'c':
case 'D':
case 'd':
printf("\n\nWRONG ANSWER!!");
break;
case 'B':
case 'b':
{
printf("\n\nCORRECT ANSWER!!");
printf("\n\nYOU WON Rs.10,000!!");
}
break;
default:
printf("\n\nIMPROPER CHOICE!!");
}
if(ans == 'B' || ans == 'b')
{
getche();
clrscr();
question6();
}

}
void question7();
void question6()
{
clrscr();
fflush(stdin);
printf("Q6.Which motor is NOT suitable for use as a DC machine?");
printf("\nA. Permanent magnet motor \t B. Series motor");
printf("\nC. Squirrel cage motor \t D. Synchronous motor");
scanf("%c",&ans);
switch(ans)
{
case 'A':
case 'a':
case 'B':
case 'b':
case 'D':
case 'd':
printf("\n\nWRONG ANSWER!!");
break;
case 'C':
case 'c':
{
printf("\n\nCORRECT ANSWER!!");
printf("\n\nYOU WON Rs.25,000!!");
}
break;
default:
printf("\n\nIMPROPER CHOICE!!");
}
if(ans == 'C' || ans == 'c')
{
getche();
clrscr();
question7();
}

}
void question8();
void question7()
{
clrscr();
fflush(stdin);
printf("Q7.Compact discs, (according to the original CD specifications)hold how many minutes of music?");
printf("\nA. 74 mins\t B. 56 mins");
printf("\nC. 60 mins\t D. 90 mins");
scanf("%c",&ans);

switch(ans)
{
case 'B':
case 'b':
case 'C':
case 'c':
case 'D':
case 'd':
printf("\n\nWRONG ANSWER!!");
break;
case 'A':
case 'a':
{
printf("\n\nCORRECT ANSWER!!");
printf("\n\nYOU WON Rs.50,000!!");
}
break;
default:
printf("\n\nIMPROPER CHOICE!!");
}
if(ans == 'A' || ans == 'a')
{
getche();
clrscr();
question8();
}

}
void question9();
void question8()
{
clrscr();
fflush(stdin);
printf("Q8.Who was played by Kenneth Branagh in 'Hamlet' (1996)?");
printf("\n| A. Horatio\t\t |\t B. Laertes\t\t\t|");
printf("\n| C. Polonius\t\t |\t D. Hamlet\t\t\t|");
scanf("%c",&ans);
switch(ans)
{
case 'A':
case 'a':
case 'B':
case 'b':
case 'C':
case 'c':
printf("\n\nWRONG ANSWER!!");
break;
case 'D':
case 'd':
{
printf("\n\nCORRECT ANSWER!!");
printf("\n\nYOU WON Rs.1,00,000!!");
}
break;
default:
printf("\n\nIMPROPER CHOICE!!");
}
if(ans == 'D' || ans == 'd')
{
getche();
clrscr();
question9();
}

}
void question10();
void question9()
{
clrscr();
fflush(stdin);
printf("Q9.Which famous national leader of India has written books on the ancient Greek philosopher Socrates and the ancient Roman king Marcus Aurelius?");
printf("\nA. Mahatma Gandhi\t B. Jawaharlal Nehru");
printf("\nC. Bal Gangadhar Tilak\t D. C.Rajagopalachari");
scanf("%c",&ans);
switch(ans)
{
case 'A':
case 'a':
case 'B':
case 'b':
case 'C':
case 'c':
printf("\n\nWRONG ANSWER!!");
break;
case 'D':
case 'd':
{
printf("\n\nCORRECT ANSWER!!");
printf("\n\nYOU WON Rs.10,00,000!!");
}
break;
default:
printf("\n\nIMPROPER CHOICE!!");
}
if(ans == 'D' || ans == 'd')
{
getche();
clrscr();
question10();
}

}
void question11();
void question10()
{
clrscr();
fflush(stdin);
printf("\n\nQ10.Sishu is the literary work of which Indian author?");
printf("\nA. Jawaharlal Nehru");
printf("\nB. Arundhati Roy");
printf("\nC. Rabindranath Tagore");
printf("\nD. Vikram Seth \n");
scanf("%c",&ans);

switch(ans)
{
case 'A':
case 'a':
case 'B':
case 'b':
case 'D':
case 'd':
printf("\n\nWRONG ANSWER!!");
break;
case 'C':
case 'c':
{
printf("\n\nCORRECT ANSWER!!");
printf("\n\nYOU WON Rs.50,00,000!!");
}
break;
default:
printf("\n\nIMPROPER CHOICE!!");
}

if(ans == 'C' || ans == 'c')
{
getche();
clrscr();
question11();
}

}
void question11()
{
clrscr();
fflush(stdin);
printf("\n\nQ11.What was the active medium used in the first working laser ever constructed?");
printf("\nA. Helium-neon gas");
printf("\nB. A ruby rod");
printf("\nC. A diamond block ");
printf("\nD. Carbon dioxide gas\n");
scanf("%c",&ans);

switch(ans)
{
case 'A':
case 'a':
case 'C':
case 'c':
case 'D':
case 'd':
printf("\n\nWRONG ANSWER!!");
break;
case 'B':
case 'b':
{
printf("\n\nCORRECT ANSWER!!");
printf("\n\nYOU WON Rs.1,00,00,000!!");
}
break;
default:
printf("\n\nIMPROPER CHOICE!!");
}

if(ans == 'B' || ans == 'b')
{
getche();
clrscr();
gotoxy(30,8);
printf("CONGRATULATIONS!!\n \
\t Thank you!!");
}


Related Links :

7 comments:

  1. plz will you explain me void question1();
    void main()
    {
    clrscr();

    printf("\n\n\n\n\n\n\t\t\t\t ______________\
    \n\t\t\t\t | Hello And WELCOME TO\t|\
    \t\t\t\t\t\t\t | KAUN BANEGA\t|\
    \t\t\t\t\t\t\t | CROREPATI\t|\
    \n\t\t\t\t |______________|\n");
    getche();
    question1();
    getch();
    }
    char a,b,c,d,A,B,C,D,ans;
    void question2();
    void question1()
    {
    clrscr();
    fflush(stdin);
    printf("\nQ1.What does AC and DC stand for in the electrical field?");
    printf("\n A. A Rock Band from Australia\t B. Alternating Current and Direct Current");

    printf("\n C. Average Current\t and Discharged Capacitor\
    \nD. Atlantic City and District of Columbia ");
    scanf("%c",&ans);
    switch(ans)
    {
    case 'A':
    case 'a':
    case 'C':
    case 'c':
    case 'D':
    case 'd':
    printf("\n\nWRONG ANSWER!!");
    break;
    case 'B':
    case 'b':
    printf("\n\nCORRECT ANSWER!!");
    printf("\n\nYOU WON Rs.1,000!!");
    break;
    default:
    printf("\n\nIMPROPER CHOICE!!");
    }

    if(ans == 'B' || ans == 'b')
    {
    getche();
    clrscr();
    question2();
    }
    }
    i didnt understood why question1();is in if statement again plz make me clear soon

    ReplyDelete
    Replies
    1. Call me i will clear uh now . +923025172305

      Delete
    2. Call me i will clear uh now . +923025172305

      Delete
  2. can you give me ppt of this project ?
    so plzzzz whatsapp on 8487066664

    ReplyDelete
  3. Thanks. I was looking for this game's code in c programming. is there a working demo also?

    Thanks,
    Merient Infotech

    ReplyDelete


If you face any Problem in viewing code such as Incomplete "For Loops" or "Incorrect greater than or smaller" than equal to signs then please collect from My Web Site CLICK HERE


More Useful Topics...

 

History Of C..

In the beginning was Charles Babbage and his Analytical Engine, a machine
he built in 1822 that could be programmed to carry out different computations.
Move forward more than 100 years, where the U.S. government in
1942 used concepts from Babbage’s engine to create the ENIAC, the first
modern computer.
Meanwhile, over at the AT&T Bell Labs, in 1972 Dennis Ritchie was working
with two languages: B (for Bell) and BCPL (Basic Combined Programming
Language). Inspired by Pascal, Mr. Ritchie developed the C programming
language.

My 1st Program...


#include
#include
void main ()
{
clrscr ();
printf ("\n\n\n\n");
printf ("\t\t\t*******Pankaj *******\n");
printf ("\t\t\t********************************\n");
printf ("\t\t\t\"Life is Good...\"\n");
printf ("\t\t\t********************************");
getch ();
}

Next Step...


#include
#include

void main ()
{
clrscr ();
printf ("\n\n\n\n\n\n\n\n");
printf ("\t\t\t --------------------------- \n\n");

printf ("\t\t\t | IGCT, Info Computers, INDIA | \n\n");
printf ("\t\t\t --------------------------- ");

getch ();

}

Hits!!!