Loop
Constructs in C MCQs Quiz. This is the first post for ComputerICS
Part 2 | Computer Science 2nd Year Chapter No.12 Loop
Constructs. Find the Multiple Choice Questions with answers. Following
MCQs | online quiz is important for the final exams as well as ECAT / entry
tests.
We tried
our best to select the important and conceptual MCQs from the Chapter No.12:
Loop Constructs in C language. This post covers the topics i.e.
introduction to repetition/loop, while loop, do-while loop, for loop, nested
loop, sentinel loop, and conditional loop in c.
x=20; y=x++; After execution the values of x and y?
x=21, y=2
x=20, y=21
x=20, y=20
x=21, y=20
Consider the following code: int main(){ int x=10; goto locate; { printf(“%d”,k); x--; } locate: return 0; } Which of the followings is used as named label?
x
goto
locate
return
How many times the loop will execute? int count=1; while(count<=5){ printf(“%d”,count); count++; }
3
4
5
6
int i=0, count=0; for(;i<=5;i*=2) count++; How many times will this loop run?
0
2
3
infinite
In do while loop, the condition is checked?
at start
in middle
at end
none of these
Which of the following loop statement has statement terminator?
while loop
do while loop
for loop
all of these
In for loop, all expressions are enclosed in?
( )
{ }
[ ]
? ?
In nested loop, which of following loop will execute less number of times?
outer loop
inner loop
outer, inner
none of these
In which of the following loop, the initialization, condition and increment / decrement are written at same place?
Post a Comment
Your feedback is highly appreciated and will help us to improve. So, please give your good suggestions.