0% found this document useful (0 votes)
7 views3 pages

12th Computer CHP 11

The document consists of short theoretical questions and answers related to control structures in programming, specifically in the C language. It covers topics such as types of control structures, selection and repetition statements, the use of curly braces, and the definition of flowcharts. Additionally, it explains the execution of instructions, the concept of conditions, and the differences between if-else and switch statements.

Uploaded by

zukihusnain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

12th Computer CHP 11

The document consists of short theoretical questions and answers related to control structures in programming, specifically in the C language. It covers topics such as types of control structures, selection and repetition statements, the use of curly braces, and the definition of flowcharts. Additionally, it explains the execution of instructions, the concept of conditions, and the differences between if-else and switch statements.

Uploaded by

zukihusnain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

318 IT Series ’

Computer
Science (MS
Short Questions

Part 1:Theoretical Questions


Q.1. What is control structure?
Astatement used to control the flow of execution
in a
control structure. The control structures in Care used to combine program
or
a single logical unit. The logical unit has
one entry point and one exit point
Q.2. List different types of control structures for writing
individualfunicntsiotrnuchies,
programs.
The basic control structures for writing
programs are
structure and repetition structure. sequence structure.
Q.3. Write three selection
statements
and three repetition statements.
The selection statements are if, if-else and switch.
do-while and for. The repetition
Q.4. When you must use curly braces
statements are w
with a selection or repetition statemenh
The curly braces are required if
selection or repetition statement has multiple
Q.5. How are instructions
executed in statemenk i L.
In sequence structure, the sequence structure?
instructions are executed in the same order in which the
specified in the program. The control flows from one statement to other in a logical
Q.6. Define flowchart. seoue
A
flowchart is the graphical representation of a
Q.7. What is a condition? program.
Acondition isan
Q.8. Which structure isexpression
that evaluates to true (1) or false (0).
used to execute a statement
structure executes a statement or repeatedly?
A repetition
set of statements repeatedly. It B
known as iteration structure or loop. The
and do-while loop. repetition structures include for lo0p, Wu
Q.9. How does a selection
A
structure select a statement to execute?
selection structure selects a
statement
condition. In this structure, a tatement or set or ofsetstatements
of statements
is executed
to executewhen abass
onthe parti
condition true and ignored when the
is
Q.10. What do you condition is false.
know about "if"
if is a keyword inClanguage.statement?
if statement is a decision-making statement.
simplest form of selection constructs. It is used to
statements by checking àcondition. execute or skip a statee
Q.11. Define compound statement.
Aset of statements written in curly brackets| | is called compound statement.
0.12. What is the use of if-else" statement?
blockofstatente
if-else statennent is another type of if bl

when the condition is true and the other statement. It executes situation,
one one

when it is false. In any


executed and the other is skipped.
319
of should
of executes
statement
if if
blocks executed
many should switch decision-making in ifproperly
statements
statement value. char. switch case a case. not expression
executed. executed. execute
statements
one
block from all any isbreak
many Ittrue. false. be
onethe and A in
statementsonlyon int unique. anywhere used,
from of iscondition
set
or should is based statement? be to with lf executes
switch
option are statement? of
condition
is and statement also not usedmatch body. result
statements option be optional. will
a
of choices
is
selection mustused
is is is switch
if only switch It break not
block case C. block exCCuted.the
ifthe statements one be switch
in operands. does
of options
only
and statements.and many switch labelcanislabel matchingstatement If default from statement?
one where statement.
whenthat
only options the statement
block statements
statement
one
choose are in in program. caselabel
default in structure? sure
slatement(s)
expression threestatements exitbe
one if-else
statement.
if
executes
of and casesexpression
there Eachdefault block? executed. alsoswitchmakes
to
set many afterC.
if-else
statements?
options
or if-else-if to C The in uses defaultswitch used
() will
the character. coming
statement usedare when
choose
to set
or
of case
"if-else"
statement. in
case
Thecolon. statement
of it fault switchcase theItcase.
is
many
there
in
the the
useful
alternative
as and be label a
in
and twois label. in in
statement easily in switch with missed blocks operator de matching
willexpression labelexecute any
labels.
Constructs
Decision be are condition.
"if-else-if"
used are
in used or and break a
in case
etpifferentia
and
betweenif-else if-else
another when statement?
used is used default if-else case used default withcase
there there construct integerend case break
an ternary
each to
used is be be using is use
matching after usedmatch of
betweenif-else-if mustbreak
of t(condition)
theit statement
syntax
eWr stat;ement;
of
can
statement
ifelse-ifaof
use used
when
basis
executes
a false. executes
isCondition
when
is
It
statement
"switch"
statements.
can can
types
switch rules
one
only
label
if
all of isoperator to ofresult
thatof must label used,alternative
happens
use
called
to
important
important

is in
statement
statement
coming
should
a
use
you
is not
block
in
range
doesthe
the
the| It
usedcondition.
nifferentiate types
some havecase not Conditional after
the
blocks
switch also
What NentsAut. ed The data whenbreak defaulL
Statement
is isIt on true.
is case is the
Whichdata Write canTheWhat Ifbreak is is cOming break not
else Deis Solsea
is
What beuted. Write It it ent(s)
Why case is
eof The The The nent ment. ure. itIs Tes, Iheall Why Ihe Elector
onlsestchoperd5 ertea
if-else
aKa
range The sevaluates
isod
A . and
conditional
he
(MS choices condition.
canstaten be
only cannot
check can follows:
expression if-else
Science It
multiple can avalable It
structure.
form. condition.
switch a
language. switch
Switch on but
Computer general as statemen Co
logical switch depending
aThe
vatues is
are but but
statements.
many decision-making
operator
choices the
C there types but between / th
for twotromsyntax of false-ca
’ in W
Seriesstatemnent
when dataas values statement
maintain:
two between
statement
result
conditiona
switchwell difference its
IT use other forof Write the stateme
as range hoose simple
switchto expression
equality on 2.
to and and select One
casier operator?
basedof Pa
easier one syntax
if-else
float seI
check a
of also for andboth
thatcan
is valuestrue-ca
advantages
is int, operatorThe
is between
statement testonecansimilarity operator
o conditional
evaluate conditions
It
understand. can uses two structure.
if-else is
statement similarity ?
(condit
Distinguish if-else conditional Conditional
of
three
switch can choices.
one
imultiple one
is if-else
Write if-elseequality. Write What returns
Theand if-else multiple
debug simple
Q.25. Q.26. Q.27. that Q.28.
check
320 int.for and
is

You might also like