Você está na página 1de 47

Training Report

on
‘C’ Programming Language

Submitted in partial fulfillment of the requirements


for the award of the degree of

BACHELOR OF TECHNOLOGY

in
INFORMATION TECHNOLOGY

Submitted By:
Ashutosh Kumar
2818162
(2018-2022)

Panipat Institute of Engineering & Technology,


(Affiliated to Kurukshetra University Kurukshetra, India)
Samalkha, Panipat
(Session: 2018-2019)

1
CANDIDATE’S DECLARATION

I hereby state that the work offered in this training report entitled “Quiz Game”, submitted in partial
contentment of the requirement for the award of the degree of Bachelor of Technology in Computer
Science&Engineering, presented to Panipat Institute of Engineering & Technology, Kurukshetra
University, Kurukshetra, India is an authentic record of my own work carried out during the period from
24th of June , 2019 to 26th of July, 2019 under the guidance of Mr. Anil Srivastav (Trainer).

The work done in this project report has not been submitted by me for the award of any other degree or
diploma.

Date: 25 July 2019 Ashutosh Kumar

Place: Murthal 2818162

1
CERTIFICATE

This is to certify that the summer training report authorized “Quiz Game” done by Ashutosh Kumar, Roll
No.2818162 is an authentic work carried out by him at INDO ASIAN Pvt Ltd. under my guidance. The
matter embodied in this “C Programming Language” has not been submitted earlier for the award of any
degree or diploma to the best of my knowledge and belief.

Date: 25 July, 2019

1
Acknowledgement

This is to certify that ASHUTOSH KUMAR, student of Panipat Institute of Engineering & Technology,
Panipat, doing I would like to prompt my deep sense of gratitude towards MR ANIL SRIVASTAV, for
allowing me to carry out my training in their establishment and making it a truly memorable one.

I am also grateful to my mentor, “Ms.KRITIKA ” who was an indispensable part of my training giving me
never-ending guidance, inspiration, encouragement, and providing me a conducive environment throughout
my training. I would also like to thank “Ms.SANGEETA YADAV” for her advice and help. The training was
an extremely productive and enriching experience, not only technically but also in the matter of providing
some practical skills.

At the end, I would like to acknowledge the faculty & staff members of P.I.E.T, Panipat who gave me an
opportunity regarding training purposes & helped me in building some experience in my career.

1
ABSTRACT

The only purpose behind the attention of this project is to generate and manage a simple database for the
question. This project is established as “QUIZ” info keeping framework of the customer in attention. Here,
data is stored popular as a binary file by “Question” and this database is fundamentally used as Master File.

Firstly, the user registers their names, next play a warmup match, after that the central quiz will be started.
After the game, the player can access their scores, reset the score, help in whatever they want, or quit the game
as per choice.

The quiz game is constructed to increase the learning of players by playing a multiple-choice quiz contest on
different topics, which is interactive, user-friendly and fun to play. This is mainly for the current affairs quiz
developed for general competition aspirants. The user can add and change questions according to his own will.

1
CONTENTS

Candidate's Declaration i

Certificate ii

Acknowledgement iii

Abstract iv

CHAPTER NO DESCRIPTION PAGE NO.

Chapter 1: INTRODUCTION to PROJECT

1.1 Introduction

1.2 Why computerized Quiz Game

1.3 Main goal of project

1.4 Tools/Platforms and Languages Used

Chapter 2: PROJECT LANGUAGE

2.1 Why using c

2.2 Short- term history behind c

2.3 Advantages and Disadvantages of C

2.4 Real-world applications

Chapter 3: STRUCTURE & STATEMENT


3.1 Flowchart of this project

3.2 Project structure

3.3 Important statement

1
Chapter 4: source code & outputs
4.1 C Program for Quiz Game System

4.2 Output screen

Chapter 5: MISCELLANEOUS
5.1 Conclusion

5.2 Bibliography

1
CHAPTER 1

INTRODUCTION TO PROJECT

1.2 Introduction

I commence with a brief introduction about this project and the different stages of the design and the
development of the Quiz Game. Before the detailed discussion, first, I would like to give an overall idea about
this project.

TITLE OF THE PROJECT

“QUIZ GAME”

I developed my project on Quiz Game because Quiz game is one of the most common and the first
application implemented by the competitive exam aspirants.

In any competitive exam, many current affairs are needed, and the current affairs play a very
significant role. The Quiz game system project maintains the stacks of current affairs. It also manages the daily
and monthly current affairs according to the different examination pattern.

1
1.2 Why Computerized Quiz Game?

Man is a social animal and has great requirements and needs. The days of the nascent man are gone.
Left too are the days when existence meant just food, clothing, and Home. Technology has changed the ways
we live. The invention of money has announced a new breed of humans. Most of the people are in the race of
the competitive examination.

To bear them, people put in hours of work. The average mature spends approximately one-third of his
or her life working. Competition to get job is booming. Therefore, it becomes required for a person to maintain
perfect and accurate record. For this we need a computerized Quiz system.

Perfectness is the key to work. It is essential for the student that the record is maintained about the
current affairs regularly. So, speedier and proper maintenance of the quiz system becomes a matter of
importance. Computerization does this in no small amount.

As we know that nowadays is the world of technology, and it has entered into each phase of everyday
life. The computer plays a significant role in daily work. Hence today is the day of computers.

1.) Availability

It offers us that information that was not provided by the manual system.

2.) Timeliness

Delivers data (output) in less time.

3.) Accuracy

Using the computer, we are going to get the knowledge more correct instead of manually.

1
4.) Important and action-oriented

Regardless of the work, we will provide the computer to do; machine works on only that work. It
means the Computer always do meaningful and action-oriented work for the user.

5.) Proportionate

Whatever the output is designed for a program by the computer should be in such a manner that it
co-relates with the size of other information groups.

“A Quiz Game System handles all information necessary for handling an examination related
question.” The system must maintain files on individual examination records, provide up to date information.

* The Quiz Game system processes data related to activities of daily news analysis. So, the Quiz
Game system is significant for a Student. Careful planning and suitable backup measures are necessary when
systematizing these activities. During the assortment process, it is valuable to appraisal our present Quiz Game
System.

A sound Quiz Game system will process input data faster and reduce clerical time, while:

 Assuring Quiz system control in making sure that productivity is correct.

 Usually, helpful reports at little before not at all incremental costs.

 The project moved with the “C” concept.

1
1.3 Main Goal of The Project

The main aim of the project is to obtain complete and correct information. Because Quiz game system of
an examination maintains a record of:

 The current affairs

 The daily student analysis

 The proper guide for a particular exam.

To do that, the department:

 Prepares the record for each examination, showing the total number of current affairs.

 Keeps track of any modification necessary related to the Examination and News.

 Produces regular reports for the examination giving the complete information required.

1
1.4 Tools/Platforms and Languages Used

Hardware Configuration
Processor: Intel integrated 620UHD

Main Memory: 8 Gb RAM

HDD: 1 Tb

Software
Operating System: WINDOWS 10

Programming Language: C

Documentation: MS-WORD 365

Backup media: Hard Disk Backup

Compile : GNU GCC (Code blocks IDE)

1
CHAPTER 2

PROJECT LANGUAGE

2.1Why using C?

C is a functional programming language. This was firstly advanced by “Dennis Ritchie” in between 1969
and 1973. It was mainly designed as a system programming language to write operating systems. The key
features of C language contain low-level access to memory, modest customary of keywords, and clean style,
that structures make C language suitable for system programmings like an operating system or compiler
development.

Learning C programming has a lot of benefits, but the primary things in which it helps is to understand the
causal construction of how things work?

They are considering a situation where a person learns to drive a Car. In this modern era, with the
improvement in technology, we have numerous choices when it arises to buying car. Here are vehicles with
auto-driving mode, auto gear modification features, etc which reduces the manual overheads and makes
driving the car more comfortable. Suppose the person learns driving on an auto-gear change permitted car.
After knowledge driving, the person applied for a driving license for which he needs to pass a driving test.
The driving trial is now on a physical car with no auto-gear transformation feature. The individual was even
not able to answer some simple questions related to gears as he was not also aware of it and ultimately ended
up getting disqualified.

Learning C has a similar benefit. If the person had academic driving on a manual car, Similarly, if a person
studies C programming first, it will benefit him to learn any current programming language as well as
learning C aid in comprehending a lot of major construction of the operating system. Like, pointers,
working with memory locations, etc.

Let’s look at some of the essential compensations of learning C programming:

 C is a Middle-Level Language.

The middle-level languages are anywhere in the Low-level machine-understandable assembly


languages and High-Level user-friendly languages. Being a middle-level language, C decreases the gap
among the low-level and high-level languages. It can be used for writing functioning systems as well
as liability application-level programming.

1
 It helps to understand the basics of Computer Concepts.

Most of the concepts related to computers like Computer Systems, Compiler Designing, Computer
Construction, Operating Systems are based on C programming language & involves a good knowledge of
C programming if you are working on them. In the modern high-level languages, the machine level details
are unseen from the user, so to exertion through “CPU cache,” Memory, Network adapters, learning C
programming is a must.

 Rarer Collections.

The c programming language has fewer libraries in evaluation with additional high-level languages. So,
learning C programming also dissipates programming concepts to a great extent as you have to write a lot
of things from scratch. You will not be reliant on the programming language totally for implementing
some basic operations, and executing them on your individual will also help you to shape your analytical
skills.

 C in terms of execution time.

Programs written and compiled in C implements much quicker than compared to any other programming
language. A c programming language is very fast in terms of implementation as it does not have any
additional dispensation overheads such as trash collection or avoiding memory leaks etc. The programmer
must take the repair of these things on his own will.

 Fixed Programming.

C is widely used in Embedded Programming. Embedded Programming is mentioned as micro-controller


programming, where the C program is used to control micro-controllers. Microcontrollers and embedded
programming are widely used in auto-motives, Robotics, Hardware, etc.

1
2.2 Short-term History of C

C is the most straightforward programming language that features a variety of expressions, new control flow,
and data structures and an ironic customary of operators. C is neither a "very high level" linguistic nor a "big"
one & is not focused on any specific area of application. But its nonappearance of restrictions and its generality
make it more convenient and practical for many tasks than supposedly more confident languages.

The past of C programming language is rather impressive. C was initially planned for and applied to the "UNIX
"working framework on the DEC PDP-ll, by Dennis Ritchie. C is the aftereffect of an improvement procedure
that began with a more established language called BCPL. Martin Richards propelled the BPCl, and it affected
a phonetic called B, which was developed by Ken Thompson. B prompted the improvement of C during the
1970s. For a long time, the accepted standard for C was the adaptation provided with the UNIX working
framework. In the mid-year of 1983, an advisory group was set up to make an ANSI (American National
Standards Institute) standard that would characterize the C language. The institutionalization procedure took
six years (any longer than anybody sensibly anticipated). The ANSI C standard remained lastly accepted in
December 1989, with the first copies becoming available in early 1990. International Standards Organization
receives the instructions, and As ANSI/ISO Standard, the resulting average states typically. After the first
Amendment 1, In 1995, the C standard was embraced, which, in addition to other things, included a few new
library capacities. The 1989 standard for C, alongside Amendment 1, turned into a base record for Standard
C++, characterizing the C subset of C++. The form of C considered by the 1989 standard is generally referred
to as C89.

During the 1990s, another standard for C was actuality created. It was the 1999 standard for C, ordinarily
alluded to as C99. When all said in done, C99 held about every one of the highlights of C89. The C99
institutionalization council concentrated on two important territories: the expansion of a few numeric libraries
and the improvement of some extraordinary use, however profoundly creative, new highlights, for example,
factor length clusters and the confine pointer qualifier. These advancements have indeed put C at the cutting
edge of scripting language improvement.C89 is the version of C in most comprehensive use, it is currently
recognized by all C compilers, and its procedures the basis for C++

1
2.3 Advantages of C language

 As a center level language, C joins the highlights of both elevated level and low-level dialects. It
tends to be utilized for low-level programming, for example, scripting for drivers and bits, and it
additionally supports elements of significant-level programming dialects, for example, scripting
for programming applications, and so forth.C is a structured programming language that allows a
sophisticated program to shattered into more straightforward schedules called functions

 C is extraordinarily portable and used for scripting system applications, which form a significant
part of Windows, UNIX, and Linux operating systems.

 C is a general resolution programming language and can efficiently work on enterprise applications,
games, graphics, and applications requiring calculations.

 C language has a well to do library that provides several built-in functions. It also offers dynamic
memory allocation.

Disadvantages of C languages :

1. Concept of C++

C is a very massive language, but it does not care the idea of OOPs (Inheritance, Polymorphism,
Encapsulation, Abstraction, Data Hiding). C tracks the practical programming method.

2. Run-time inspection

In the C programming language, the mistakes or the bugs aren’t noticed after apiece line of code. Instead, the
compiler displays all the errors after writing the program. It makes the checking of the system very complex
in large applications.

3. Concept of namespace

C does not implement the idea of namespaces. A namespace is arranged as a chain of commands to allow the
reuse of names in unique situations. Without namespaces, we cannot state two variables of the same name.

But, C programming absences in this feature, and hence you cannot label a variable with a similar name in
C.

1
4. Lack of Exemption Handling

Exception Handling is one of the important structures of programming languages. While compiling the code,
various anomalies and bugs can occur. Exception Handling allows you to catch the error and take
appropriate responses. However, C does not exhibit this vital feature.

5. Constructor And Destructor

C does not have any constructor & destructor.

Constructors & Destructors support the basic functionality of Object-Oriented Programming. Both are
member functions that shaped as soon as an object of the class is created. You will be studying constructor
and destructor in detail later.

6. Low level of abstraction

C is a small and core machine language that has minimum data hiding and restricted visibility that affects the
security of this language.

1
2.4 Real-World Applications of C

1. Operating Systems:
Scripting of the UNIX functioning system was the significant determination behind creation of C.
Additionally, as programs scripted in C get performed with speeds equal to assembly language, C language
has been an essential part of the growth of numerous operating systems. Unix-Kernel, Microsoft Windows
services, and operating system applications, and an extensive section of the Android operating system have all
remained written in C.

2. Development Of New Languages:


The efficiency of code execution and simplicity has caused in C straight or indirectly inducing the growth of
numerous languages, including C++, which is C with classes, JavaScript, C#, D, Limbo, Perl, UNIX’s C
Shell, Java, PHP & Python. These languages use C in variable size: for instance, in Python, C is used for
structure standard libraries

3. Calculation Stages:
C tools algorithms and data structures swiftly, simplifying faster computations in programs. It has enabled the
use of C in bids demanding higher degrees of calculations like MATLA,B, etc.

4. Embedded Systems:
Various features of C, including direct access to machine level hardware APIs, presence of C compilers,
deterministic resource use, and dynamic memory distribution, variety C language the most beautiful optimal
for scripting submissions and drivers of implanted systems.

5. PHOTOGRAPHS and Games:


C linguistic has been used in the expansion of a variety of graphics and gaming applications, such as chess,
bouncing ball, archery, etc.

1
CHAPTER 3

STRUCTURE & STATEMENT

3.1 The flowchart of this project is as follows :

START

1. Start the game

2. Highest score

3. Reset score

4. Help

5. Quit

Y
Start the game
IS CH=1?
N

Highest score
IS CH=2?
Y

N
Y Reset score
IS CH=3?
N

N
Y
Help
IS CH=4?

N Y
Quit
IS CH=5?

1
STOP
3.2 Program Structure

I am developing my project on Quiz game System keeping because of the functioning of the game to provide
the computerized facility to provide current affairs and their Daily analysis.

The structure of the programs is as follows:

NAMING CONVENTION

Objects Naming Conventions

Header files stdio.h, conio.h, ctype.h, stdlib.h, string.h

Label go, mainhome, home, score, game, test

Control statement break, goto, switch case, if-else, for

Functions show_record(), reset_score(), help(), edit_score(), main(), toupper()

Objects Naming Conventions

Program variables countr, r1, r, count, i, n, score, choice, player, sc, nm, *f,

Program file Quizgame.c

1
3.3 Important statement :

Switch case declarations are a supernumerary for extended if statements that link a variable to several
integral values
 The switch declaration is a multiway division statement. It delivers an easy way to notice the execution
of different parts of code based on the value of the expression.
 A switch is a control assertion that agrees with a value to change control of execution.
Syntax:

Switch (expression) {

case constant-expression :
statement(s);
break;

case constant-expression :
statement(s);
break;

default:
statement(s);
}

If____else
An if declaration can be followed by an optional else if...else comment, which is very useful to test various
circumstances using single if...else if statement.
When using if...else if..else declarations, there are rare facts to save in mind −
 If canister take nothing or unique else's, and it must come afterward, any else if's.
 An if can take zero to several else if's and they necessity originate earlier the else.
 Once an else if flourishes, none of the residual else, if's or else's, will be verified.

1
The arrangement of an if.._.else if...else statement in C programming language is −
if (Boolean_expression 1) {

} else if(boolean_expression 2) {
} else if(boolean_expression 3) {
} else {

The for loop is a recurrence control structure that allows you to efficiently write a loop that needs to execute
a specific number of times.

Syntax
The syntax of a for loop in C programming language is −
for ( init; condition; increment ) {
statement(s);
}

The Break declaration in C programming has the following two usages −


 When a break statement met inside a loop, the loop is proximately finished, and the program control
resumes at the next statement following the loop.
 It can be used to terminate a case in the switch statement (covered in the next chapter).
If you are using nested loops, the break statement will stop the execution of the innermost circle and start
executing the next line of code after the block.

Syntax
The syntax for a break statement in C is as follows −
Break;

1
A goto statement in C programming provides an unconditional jump from the 'goto' to a labeled account in
the same function.
NOTE − Use of goto statement is highly discouraged in any programming language because it makes it
difficult to trace the control flow of a program, making the plan hard to understand and care to modify. Any
application that uses a goto can be rewritten to avoid them.

Syntax
The syntax for a goto statement in C is as follows −
Goto label;
..
.
name: statement

1
CHAPTER 4
SOURCE CODE & OUTPUTS

4.1 C Program for Quiz Game System

#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 player[20];

mainhome:

system("cls");

printf("\t\t\tC PROGRAM on QUIZ GAME\n");

printf("\n\t\t------------------------");

printf("\n\t\t\t WELCOME to THE GAME ");

printf("\n\t\t--------------------------");

printf("\n\t\t-------------------------------");

printf("\n\t\t > Click S to start the game");

printf("\n\t\t > Click V to view the highest score ");

printf("\n\t\t > Click R to reset score");

printf("\n\t\t > Click H for help ");

printf("\n\t\t > Click Q to quit ");

printf("\n\t\t---------------------------------\n\n");
1
ch=toupper(_getch());

if (ch=='V')

show_record();

goto mainhome;}

else if (ch=='H')

help();

_getch();

goto mainhome;

elseif(ch=='R')

{reset_score();

_getch();

goto mainhome;}

else if (ch=='Q')

exit(1);

else if(ch=='S')

structure("sls")

printf("\n\n\n\t\t\t Enter your name:");

gets(player);

system("cls");

printf("\n ********** Welcome %s to C Quiz **************",player);

printf("\n\n Here are roughly tips you might know before playing:");

printf("\n ------------------------------------------------------------------------
-");

printf("\n >> There are 2 circles in this Quiz Game,PREPARATION ROUND & CENTRAL
ROUND");

printf("\n >> In preparation rounded you will be asked a total of 5 questions to


check your knowledge");

printf("\n over-all knowledge. You are qualified to play the game if you
answered atleast 3");

printf("\n correct answers, else you can't continue additional to the Central
round.");

printf("\n >> Your game begins with central round. In this circular you will be
asked a question");

printf("\n total of 20 questions. Each right answer will be awarded $10!");


1
printf("\n By this method you can conquest upto 2 hundread dollar cash prize!--
.....");

printf("\n >> You will be given 4 choices and you have to press A, B ,C or D for
the the answer ");

printf("\n\t\t\tcorrect option………….")

printf("\n >> You will be asked questions endlessly, till the 20 questions");

printf("\n >> No negative marking provided for incorrect answers!!!!!!");

printf("\n\n\t!!!!! Best of Luck !!!!!");

printf("\n\n\n Press Y to begins the game!!!!!\n");

printf("\n Press any extra key to reoccurrence to the main menu!");

if (toupper(_getch())=='Y')

goto home;

else

goto mainhome;

system("cls");

home:

system("cls");

count=0;

for(i=1;i<=5;i++){

system("sls");

switch(r1)

case 1:

print("\n\nWhich of the succeeding is a Palindrome number?");

printf("\n\nA.1234\t\tB.010120\n\nC.45454\t\tD.56789");

if (toupper(_getch())=='C')

printf("\n\nRight!!!");count+1;

break;

_getch();}

1
else

printf("\n\nIncorrect!!! The right answer is C.45454");

break;

_getch();

case 2:

printf("\n\n\nThe country with the maximum environmental performance


index is...");

printf("\n\nA.USA\t\tB.India\n\nC.Switzerland\t\tD.Norway");

if (toupper(_getch())=='C')

{printf("\n\nright!!!");count+1;

_getch();

break;}

else

{printf("\n\nIncorrect!!! The right answer is


C.Switzerland");

break;

_getch();}

case 3:

printf("\n\n\nWhich animal giggles like human being?");

printf("\n\nA.Bear\t\tB.Hyena\n\nC.Monkey\t\tD.Donkey");

if (toupper(_getch())=='B')

{printf("\n\nright!!!");count+1;

break;

_getch();

else

{printf("\n\nIncorrect!!! The Right answer is B.Hyena");

break;

_getch();}

Case_4:

printf("\n\n\nWho was presented the freshest player honor in Fifa


World tournament 2006 ?");

1
printf("\n\nA.Pale\t\tB.Lucas Podolski\n\nC. Christiano Ronaldo
\t\tD.lionel messi ");

if (toupper(_getch())=='B')

{printf("\n\nright!!!");count+1;

break;

_getch();

else

{printf("\n\nIncorrect!!! The right answer is B.Lucas


Podolski");

break;

_getch();

case 5:

printf("\n\n\nWhich is the third peak foothill in the world?");

printf("\n\nA.Mt. everest\t\tB.Mt. Kanchanjungha\n\nC. Mt. K2\t\tD.Mt.


makalau");

if (toupper(_getch())=='B')

{printf("\n\nright!!!");count+1;

break;

_getch();

else

{printf("\n\nIncorrect!!! The right answer is B.Mt.


Kanchanjungha");

break;

_getch();}

} }

if(count>=3)

{goto_test;}

else{

system("sls");

printf("\n\nSORRY YOU ARE NOT QUALIFIED TO PLAY THIS GAME, try again");

Goto_Mainhome;

1
structure("sls");

printf("\n\n\t*** CONGRATS %s you are qualified to play the Game ***",player);

printf("\n\n\t!!!!!!!!!!Press any key to begin the Game!!!!!!!!!!!");

if(toupper(_getch())=='p')

{goto game;}

game:

countr=0;

for(i=1;i<=20;i++)

{Structure("cls");

r=i;

switch(r)

case 1:

printf("\n\nRead the following statements carefully:");

printf("\n\n1.PM Modi along with others world leaders inaugrated the


Gandhi solar ");

printf("\nPark at the Un headquaters and released a commemorative


stamp issued by the ");

printf("\nUN on the ocassion of Gandhi's100th birth Annniversary.");

printf("\n\n2.The platform is a living example that Mahatma gandhi was from


india but");

printf("\ndid not belong only to india.");

printf("\n\n3.Gandhiji had stressed on the real strength of democracy.");

printf("\n\nWhich of the above statements is/are correct?");

printf("\n\nA.only 1\t\tB.only 1&2\n\nC.only 1&3\t\tD.only 2&3");

if (toupper(_getch())=='D')

{printf("\n\nright!!!");countr++;_getch();

break;

_getch();

else

{printf("\n\nIncorrect!!! The right answer is D.only


2&3");//_getch();

break;

case 2:
1
printf("\n\n\nRecently who has been named for the prestigious Dada
Sahab Phalke award");

printf("\n\nA.Dharmendra\t\tB.Amitabh Bbachchan\n\nC.Rishi
Kapoor\t\tD.Mithun Chakraborty");

if (toupper(_getch())=='B')

{printf("\n\nright!!!");countr+1;_getch();

break;}

else

{printf("\n\nincorrect!!! The right answer is B.Amitabh


Bbachchan");_getch();

break;

case 3:

printf("\n\n\nWhich of the followwing companies has tied up with


FEBRABAN,an industry");

printf("\nbody representing the Brazil's financial services industry


in september 2019?");

printf("\n\nA.Wipro\t\t\tB.TCS\n\nC.Reliance\t\tD.LG");

if (toupper(_getch())=='A')

{printf("\n\nright!!!");countr+1;

break;

_getch();}

else

{printf("\n\nincorrect!!! The right answer is A.Wipro");

break;

_getch();}

case 4:

printf("\n\n\nwhich tickets will be issued to women passengers under


the ");

printf("\nDelhi Government's Scheme For free travel in DTC and


cluster buses?");

printf("\n\nA.Orange\tB.Red\n\nC.Pink\t\tD.Green");

if (toupper(_getch())=='C')

{printf("\n\nright!!!");countr+1;

break; _getch();

} else

1
printf("\n\nincorrect!!! The right answer is C.Pink");

break;

_getch();

case 5:

printf("\n\n\nWhich of the following won the Under-14 boys


championships of ");

printf("\nSubroto Cup international Football tournament in August


2019?");

printf("\n\nA.Unique Model Academy of Mnipur\t\tB.The Assam Valley


School\n\nC.St.Edmud's School,Meghalaya\t\t\tD.Saidan Secondry School Of Mizoram");

if (toupper(_getch())=='D')

{printf("\n\nright!!!");countr+1; break;

_getch();}

else

printf("\n\nincorrect!!! The right answer is D.Saidan


Secondry School Of Mizoram");

break;

_getch(); }

case 6:

printf("\n\n\nWho has become the first Indian national to coplete


the 'La Ultra The High' Marathon");

printf("\n\nA.Budhia Singh\t\tB.Fauja Singh\n\nC.Arun


Bhardwaj\t\tD.Ashish Kasodekar");

if (toupper(_getch())=='D' )

{printf("\n\nright!!");countr+1;

break; _getch();

else

{printf("\n\nincorrect!!! The right answer is D.Ashish


Kasodekar"); break;

_getch();

case 7:

1
printf("\n\n\nUnion human Resource Minister Development Minister
Ramesh Pokhriyal 'Nishank' ");

printf("\nlaunched One of world's largest Integrated Online Junction


for School Education________ in August 2019");

printf("\n\nA.Vidya\t\tB.Parishram\n\nC.Shagun\tD.Medhavi");

if (toupper(_getch())=='C')

{printf("\n\nright!!!");countr+1;

break; _getch();

else

{printf("\n\nincorrect!!! The right answer is C.Shagun");

break; _getch();}

case 8:

printf("\n\n\nRecently,the all-girl team'Tech witches' from Noida


Have developed a mobile App,");

printf("\ncalled___________,that connects children at orphanages


with senior citizens in old-age homes.");

printf("\n\nA.Milap\t\tB.Maitri\n\nC.Sakhi\t\tD.Milan");

if (toupper(_getch())=='B')

{printf("\n\nright!!!");countr+1;_getch(); break;}

else

{printf("\n\nincorrect!!! The right answer is B.Maitri");

break;

_getch();}

case 9:

printf("\n\n\nWho was falicitated by the Indian Body Builder


Federation in August 2019?");

printf("\n\nA.S Bhaskaran\t\tB.Rajendran Mani\n\nC.Suhas


khankar\t\tD.Neeraj kumar");

if (toupper(_getch())=='A')

{printf("\n\nright!!!");countr+1;

break; _getch();}

else

{printf("\n\nincorrect!!! The right answer is A.S


Bhaskaran"); break;

_getch();}

1
case 10:

printf("\n\n\n__________fended off Lewis Hamilton to claim a


bittersweet First Formula one win i September 2019");

printf("\n\nA.Alexander Albon\t\tB.George Russell\n\nC.Charles


Leclerc\t\tD.Valtteri Bottas");

if (toupper(_getch())=='C')

{printf("\n\nright!!!");countr+1; break;

_getch();}

else

{printf("\n\nincorrect!!! The right answer is C.Charles


Leclerc"); break;

_getch();}

case 11:

printf("\n\n\nWhere did PM Narendra Modi inaugrated the Garvi


Gujarat Bhavan in September 2019?");

printf("\n\nA.Ahmedabad\t\tB.Mumbai\n\nC.New Delhi\t\tD.Pune");

if (toupper(_getch())=='C')

{printf("\n\nright!!!");countr+1;

break;

_getch();

else

{printf("\n\nincorrect!!! The right answer is C.New Delhi");

break;

_getch();

case 12:

printf("\n\n\nWhich country hosted the 5th Eastern Economic Forum-


EEF summit?");

printf("\n\nA.India\t\tB.China\n\nC.Japan\t\tD.Russia");

if (toupper(_getch())=='D')

{printf("\n\nright!!!");countr+1;

break;

_getch();

else

1
{printf("\n\nIncorrect!!! The right answer is D.Russia");

break;

_getch();

case 13:

printf("\n\n\nIn september 2019, Virat Kohli Has became the most


successful Test ");

printf("\ncaptain of the nation with_______ wins in 48 matches.");

printf("\n\nA.22\t\tB.26\n\nC.28\t\tD.30");

if (toupper(_getch())=='C')

{printf("\n\nright!!!");countr+1;

break;

_getch();}

else

{printf("\n\nIncorrect!!! The right answer is C.28");

break;

_getch();}

case 14:

printf("\n\n\nDr Harsh Vardhan addressed the 72nd session of the ");

printf("WHO Regional Committee for South Asia on 2nd September 2019


in_____");

printf("\n\nA.New Delhi\t\tB.Pune\n\nC.Mumbai\t\tD.Kolkata");

if (toupper(_getch())=='A')

{printf("\n\nright!!!");countr+1;

break;

_getch();

else

{printf("\n\nIncorrect!!! The right answer is A.New Delhi");

break;

_getch();}

case 15:

printf("\n\n\nWho has appointed as the new brand ambassador f kesh


King for its shampoo,in September 2019?");

1
printf("\n\nA.Aishwarya Rai\t\tB.karishma Kapoor\n\nC.Shilpa
Sethi\t\tD.Madhuri Dixit");

if (toupper(_getch())=='C')

{printf("\n\nright!!!");countr+1;

break;

_getch();}

else

{printf("\n\nIncorrect!!! The right answer is C.Shilpa


Sethi"); break;

_getch();}

case 16:

printf("\n\n\nRecently, Hamilton Masakadza Announced his


retirement.He is associated with which sport?");

printf("\n\nA.Cricket\t\tB.Hockey\n\nC.Football\t\tD.Polo");

if (toupper(_getch())=='A')

{printf("\n\nright!!!");countr+1;

break;

_getch();

else

printf("\n\nIncorrect!! The right answer is A.Cricket");

break;

_getch();}

case 17:

printf("\n\n\nWhere is a four-day international symposium on


buckwheat being organised in September 2019?");

printf("\n\nA.Manipur\t\tB.Nagaland\n\nC.Meghalaya\t\tD.Sikkim");

if (toupper(_getch())=='C')

{printf("\n\nright!!!");countr+1;

break;

_getch();}

else

{printf("\n\nIncorrect!!! The right answer is C.Meghalaya");


1
break;

_getch();}

case 18:

printf("\n\n\nRecently, India has surpassed________ to move into the


list ");

printf("\nof top 1 countries in terms of total gold reserves.");

printf("\n\nA.Poland\t\tB.Sweden\n\nC.Netherlands\t\tD.Norway\n\n");

if (toupper(_getch())=='C')

{printf("\n\nright!!!");countr+1;

break;

_getch();}

else

{printf("\n\nincorrect!!! The right answer is


C.Netherlands");

break;

_getch();

case 19:

printf("\n\n\nRecently,Kiran Nagarkar passed away. He was a/an


___________");

printf("\n\nA.Politician\tB.Novelist\n\nC.Actor\t\tD.Judge\n\n");

if (toupper(_getch())=='B')

{printf("\n\nright!!!");countr+1;

break;

_getch();

else

{printf("\n\nIncorrect!!! The right answer is B.Novelist");

break;

_getch();}

case 20:

printf("\n\n\nWhere was the first National Conference on Cybercrime


Investigation and forensics organised?");

printf("\n\nA.Mumbai\t\tB.New
Delhi\n\nC.Hyderabad\t\tD.Chandigarh");

1
if (toupper(_getch())=='B')

{printf("\n\nIncorrect!!!");countr+1;

break; _getch();

else

{printf("\n\nincorrect!!! The right answer is B.New


Delhi");_getch();goto score;

break;}

case 21:

printf("\n\n\nPrime minister Narendra Modi visited ________ and


Aurangabad ?");

printf("\non 7 September 2019 to inaugurate a slew of new


projects.");

printf("\n\nRatnagiri\t\tB.Pune\n\nC.Nagpur\t\tD.Mumbai");

if (toupper( getch())=='D')

{printf("\n\nright!!!");countr+1;

break;

_getch();}

else

{printf("\n\nincorrect!!! The rightr answer is D.Mumbai");

break;

_getch();}

}}

score:

system("cls");

score=(float)countr*200;

if(score>0.00 && score<200)

printf("\n\n\t\t############# CONGRATS ################");

printf("\n\t You have won $%.2f",score);goto go;}

else if(score==200.00)

printf("\n\n\n \t\t################### CONGRATS ################");

printf("\n\t\t You have won $%.2f",score);

1
}

else

printf("\n\n\t^^^^^^^^^^^^ SORRY YOU DIDN'T WIN^^^^^^^^^^^^^^^");

printf("\n\t\t TRY AGAIN, Better luck next time");goto go;}

go:

puts("\n\n Press Y if you want to perform next game");

puts(" Press any other key for main_menu");

if (toupper(_getch())=='Y')

goto home;

else

edit_score(score,player);

goto mainhome;}}}

void show_record()

{structure("sls");

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 held the Maximum Score %0.2f",name,scr);

printf("\n\n\t\t%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");

fclose(f);

_getch();}

void reset_score()

{structurem("sls");

float sc;

char name[20];

FILE *f;

f=fopen("score.txt","r+");

fscanf(f,"%s%f",&name,&sc);

1
sc=0;

fprintf(f,"%s,%.2f",nm,sc);

fclose(f);}

void help()

{system("cls");

printf("\n\n HELP");

printf("\n __________________________________________________________

printf("\n ......................... C program Quiz Game...........");

printf("\n >> There are two circles in the game, preparation ROUND & CENTRAL
round");

printf("\n >> In preparation round you will be asked a total of 5 questions to


CHECK your KNOWLEDGE");

printf("\n knowledge. You will be qualified to play the game if you can answered
atleast 3");

printf("\n CORRECT answers else you can't play the Game...........");

printf("\n >> Your game begins with the CHALLANGE ROUND. In this round you will be
asked");

printf("\n total 20 questions each right answer will be awarded $10.");

printf("\n Through this way you can win upto ONE hundred cash prize in
USD...............");

printf("\n >> You will be given 4 choices and you have to click A, B ,C or D for
the correct answer");

printf("\n correct choices");

printf("\n >> You will be asked questions uninterruptedly if you keep giving the
right answers.");

printf("\n\n\t*********************BEST OF
LUCK*********************************");

printf("\n\n\t*****This QUIZ GAME is developed by Shubham Pandey********");}

void edit_score(float score, char plname[20])

{structure("sls");

float sc;

char name[20];

FILE *f;

f=fopen("score.txt","r");

fscanf(f,"%s%f",&name,&sc);

if (score>=sc)

1
{ sc=score;

fclose(f);

f=fopen("score.txt","w");

fprintf(f,"%s\n%.2f",plnm,sc);

fclose(f);}}

1
4.2 Output Screens

Welcome to the Quiz Game

Register yourself :::

1
Now start the Quiz Game by pressing ” Y” or go to the main menu by clicking another key.

Start the warmup match

Start the warmup match(contd.)

1
Welcome to the main quiz game press any key to start the game!

The main quiz starts. Answers the following question and won prizes.

1
At the end of the game now you can see how much amounts you have won.

In the section of the maximum score.

1
Help menu. Here you can know about the T&C of this game

Now quit the game by pressing the Q key

1
CHAPTER 5

MISCELLANEOUS

5.1 Conclusion

I want to say that this Training program is an excellent time for us to get to the ground experience and
the things that we would have never gained through going straight into a job. I am grateful to the INDO ASIAN
Pvt. Ltd. for giving me this excellent opportunity.

The main motive of industrial training is to provide an excellent opportunity for undergraduates to
identify, observe, and practice how engineering applied in the real industry. It provides technical and
management practices and to interact with fellow workers.

It is easy to work with classy machines, but not with people. The only chance that an undergraduate
must have this experience in the industrial training time. I sense I grew the all-out of that experience. Also, I
learned the way of work in an establishment, the status of being punctual, the status of maximum commitment,
and the importance of team spirit.

The whole training program was for four weeks. In my opinion, I have added lots of knowledge &
experience needed to be successful in a significant engineering challenge, as in my opinion, Engineering is,
after all, a challenge, and not a Job.

1
5.2 Bibliography:

[1]. Kernighan and Ritchie, The C Programming Language, 2nd Ed.


[2]. C: The Complete Reference
[3]. Randal E. Bryant, David R. O'Hallaron, Computer Systems: A Programmer's
Perspective.
[4]. Let Us C Yashwant kanetkar

Você também pode gostar