Questions

MCQ . (1 Marks)

🎯

Test yourself on this topic

49 questions · timed · auto-graded

MCQ 11 Mark
C program runs forever when______.
  • for (;;)
  • B
    for (;)
  • C
    for (;;;)
  • D
    for ;);
Answer
Correct option: A.
for (;;)
a
View full question & answer
MCQ 21 Mark
The loop becomes infinite due to non-availability of in the logic of loop.
  • A
    Expression 1
  • Exit condition
  • C
    Expression3
  • D
    all of the given
Answer
Correct option: B.
Exit condition
b
View full question & answer
MCQ 31 Mark
Any loop in a program becomes________ loop if it runs forever and program control never comes out of it.
  • A
    entry
  • B
    exit
  • infinite
  • D
    incoming
Answer
Correct option: C.
infinite
c
View full question & answer
MCQ 41 Mark
For the _______ loop/s. continue statement causes the program control passes to the conditional tests.
  • A
    while
  • B
    do... while
  • C
    for
  • both A and B
Answer
Correct option: D.
both A and B
d
View full question & answer
MCQ 51 Mark
Use of $……$ loop is advisable for counter based exit condition.
  • for
  • B
    while
  • C
    both $A$ and $B$
  • D
    do... while
Answer
Correct option: A.
for
View full question & answer
MCQ 61 Mark
$..........$are unconditional transfer control statements.
  • A
    for, while
  • B
    for, do... while
  • break, continue
  • D
    while, do... while
Answer
Correct option: C.
break, continue
View full question & answer
MCQ 71 Mark
In loop, continue statement transfers the control to the test expression used with while statement.
  • A
    for
  • B
    while
  • C
    do... while.
  • both B and
Answer
Correct option: D.
both B and
d
View full question & answer
MCQ 81 Mark
In for loop. continue statement causes_______ of the loop to execute.
  • A
    conditional test
  • B
    increment portions
  • both A and
  • D
    expression I
Answer
Correct option: C.
both A and
c
View full question & answer
MCQ 91 Mark
In loop, continue statement transfers the control to expression3.
  • for
  • B
    while
  • C
    do... while
  • D
    None of the given
Answer
Correct option: A.
for
a
View full question & answer
MCQ 101 Mark
The statement stops the current iteration of the loop and continues the next Iteration of the loop.
  • continue
  • B
    go to
  • C
    break
  • D
    start
Answer
Correct option: A.
continue
a
View full question & answer
MCQ 111 Mark
The _______ statement forces the next iteration of the loop to take place, skipping any code in between.
  • continue
  • B
    break
  • C
    for
  • D
    while
Answer
Correct option: A.
continue
a
View full question & answer
MCQ 121 Mark
In case of ______loop, the break statement will stop the execution of currently existing loop.
  • A
    for
  • B
    while
  • Nested
  • D
    do... while
Answer
Correct option: C.
Nested
c
View full question & answer
MCQ 131 Mark
The ______ statement is used to terminate a case in the switch statement.
  • A
    continue
  • break
  • C
    default
  • D
    case
Answer
Correct option: B.
break
b
View full question & answer
MCQ 151 Mark
_______statement is used to terminate loop instantly without even execution of other statement of loop.
  • A
    Continue
  • Break
  • C
    Stop
  • D
    Exit
Answer
Correct option: B.
Break
b
View full question & answer
MCQ 161 Mark
The control structure of the loop may vary in _______ loop.
  • A
    for
  • B
    do... while
  • C
    while
  • Nested
Answer
Correct option: D.
Nested
d
View full question & answer
MCQ 171 Mark
Using one loop structure within another loop structure is known as loop.
  • nesting
  • B
    breaking
  • C
    layering
  • D
    none of the given
Answer
Correct option: A.
nesting
a
View full question & answer
MCQ 181 Mark
The compound statement of any loop should be written with in______.
  • A
    ( )
  • ( )
  • C
    [ ]
  • D
    ({ })
Answer
Correct option: B.
( )
b
View full question & answer
MCQ 191 Mark
in which of the following loop. body of loop will be executed at least once?
  • do... while
  • B
    for
  • C
    while
  • D
    All of the given
Answer
Correct option: A.
do... while
A
View full question & answer
MCQ 201 Mark
In _______loop, the test expression is checked after executing body of loop.
  • A
    for
  • B
    while
  • do... while
  • D
    both B and C
Answer
Correct option: C.
do... while
c
View full question & answer
MCQ 211 Mark
Which of the following loop is used when number of iterations are not pre-determined?
  • A
    A while
  • B
    do... while
  • Both A and B
  • D
    for
Answer
Correct option: C.
Both A and B
c
View full question & answer
MCQ 221 Mark
________ loop is suitable to find sum of all numbers entered until user enters zero.
  • A
    for
  • B
    while
  • C
    do... while
  • Both B and C
Answer
Correct option: D.
Both B and C
d
View full question & answer
MCQ 231 Mark
In _______ loop, if test expression is evaluated to false. the body part will not be executed at all.
  • A
    for
  • while
  • C
    do... while
  • D
    none of the given
Answer
Correct option: B.
while
b
View full question & answer
MCQ 241 Mark
________loop is more suitable when number of iterations can't be pre-determined and also loop terminating condition is to be tested before entering the loop.
  • while
  • B
    do... while
  • C
    for
  • D
    Both A and C
Answer
Correct option: A.
while
a
View full question & answer
MCQ 251 Mark
If _______of for loop is evaluated to false then the loop terminates.
  • A
    Expression 1
  • Expression2
  • C
    Expression3
  • D
    All of the given
Answer
Correct option: B.
Expression2
b
View full question & answer
MCQ 261 Mark
If_______ of for loop is evaluated to true, then the body of loop gets executed.
  • A
    Expression 1
  • Expression2
  • C
    Expression3
  • D
    All of the given
Answer
Correct option: B.
Expression2
b
View full question & answer
MCQ 271 Mark
All the expressions of for loop are_______.
  • A
    compulsory
  • optional
  • C
    conditional
  • D
    operator
Answer
Correct option: B.
optional
b
View full question & answer
MCQ 291 Mark
________ in for loop, works for incrementing or decrementing value of control variable.
  • A
    Expression 1
  • B
    Statement block
  • Expression3
  • D
    Expression2
Answer
Correct option: C.
Expression3
c
View full question & answer
MCQ 301 Mark
_______ in for loop, is used to evaluate the test condition every time.
  • A
    Expression 1
  • B
    Expression3
  • Expression2
  • D
    All of the given
Answer
Correct option: C.
Expression2
c
View full question & answer
MCQ 311 Mark
______-in for loop. is used for checking loop terminating criteria.
  • A
    Expression2
  • Expression1
  • C
    Statement block.
  • D
    Expression3
Answer
Correct option: B.
Expression1
b
View full question & answer
MCQ 321 Mark
Which of the following works as test condition in for loop?
  • A
    Expression 1
  • Expression2
  • C
    Expression3
  • D
    none of the given
Answer
Correct option: B.
Expression2
b
View full question & answer
MCQ 331 Mark
In _______loop, control variable is used to control the number time a loop is to be executed.
  • A
    while
  • B
    do... while
  • for
  • D
    if
Answer
Correct option: C.
for
c
View full question & answer
MCQ 341 Mark
______in for loop works for initializing value of counter variable.
  • Expression 1
  • B
    Expression2
  • C
    Expression3
  • D
    All of the given
Answer
Correct option: A.
Expression 1
a
View full question & answer
MCQ 351 Mark
_______in for loop is also known as control variable.
  • A
    Expression3
  • Expression1
  • C
    Statement block
  • D
    Expression2
Answer
Correct option: B.
Expression1
B
View full question & answer
MCQ 361 Mark
Expression in for loop works________.
  • A
    for initializing value of counter variable
  • B
    as control variable
  • C
    for increment
  • both A and B
Answer
Correct option: D.
both A and B
d
View full question & answer
MCQ 391 Mark
_______condition is used inside for loop to make it more dynamic.
  • A
    Entry
  • B
    Exit
  • C
    A or B
  • None of the given
Answer
Correct option: D.
None of the given
d
View full question & answer
MCQ 401 Mark
The_______ loop is generally used when block of statements need to be executed for fixed number of times.
  • A
    while
  • B
    break
  • C
    do... while.
  • for
Answer
Correct option: D.
for
d
View full question & answer
MCQ 411 Mark
_______is/are exit controlled loop.
  • A
    for
  • B
    while
  • do... while
  • D
    Both B and C
Answer
Correct option: C.
do... while
c
View full question & answer
MCQ 421 Mark
_______ is/are entry/controlled loop.
  • A
    for
  • B
    while
  • C
    do... while
  • Both A and
Answer
Correct option: D.
Both A and
d
View full question & answer
MCQ 431 Mark
In case of______ loop. body will be executed at least once before exiting from the loop.
  • A
    entry controlled
  • exit controlled
  • C
    process controlled
  • D
    time controlled
Answer
Correct option: B.
exit controlled
b
View full question & answer
MCQ 441 Mark
In______ controlled loop. the exit/control condition is checked before executions of statements inside loop body.
  • entry
  • B
    exit
  • C
    process
  • D
    time
Answer
Correct option: A.
entry
a
View full question & answer
MCQ 451 Mark
Depending on ______in loop, it can be classified into 2 types.
  • A
    parts
  • the place of control statement
  • C
    both A and B
  • D
    types of program
Answer
Correct option: B.
the place of control statement
b
View full question & answer
MCQ 471 Mark
The word_____ suggest that the flow of execution may not be sequential and control may be transferred to any statement based on given conditions of the program.
  • A
    binary structure
  • B
    conditional structure
  • control structure
  • D
    none of the given
Answer
Correct option: C.
control structure
c
View full question & answer
MCQ 481 Mark
In looping, the sequence of statements are executed until some_____ condition is satisfied.
  • exit
  • B
    entry
  • C
    if
  • D
    switch
Answer
Correct option: A.
exit
a
View full question & answer
MCQ 491 Mark
All programming languages offer _______ structure allowing programmers to execute a statement or group of statements multiple times.
  • loop control
  • B
    switch
  • C
    decision making
  • D
    A or B
Answer
Correct option: A.
loop control
a
View full question & answer