More Classes
5th Class
6th Class
7th Class
8th Class
9th Class
10th Class
11th Class
12th Class
NAT I
NAT II
CSS
IQ
General Knowledge
MDCAT
ECAT
GAT General
GAT Subject
Other Links
Go to Home
Online Tests
Computer Science Ics Part 2 Chapter 12 Online Test MCQs With Answers
Question # 1
Which loop structure always executes at least once?
Choose an answer
Do-while
For
While
All
Previous
Skip
Next
Question # 2
This statement causes a loop to terminate early?
Choose an answer
Break
Terminate
Exit
A and B
Previous
Skip
Next
Question # 3
When is while loop more appropriate then for loop?
Choose an answer
The terminating condition occurs unexpectedly
The body of loop will be executed at least once
The program will be executed at least once
The number times the loop will be executed is known before the loop executes
Previous
Skip
Next
Question # 4
One execution of a loop is known as a(n):
Choose an answer
Cycle
Duration
Iteration
Test
Previous
Skip
Next
Question # 5
The loop structure in which condition comes after the body of the loop is
Choose an answer
While
Do-while
For
All
Previous
Skip
Next
Question # 6
A counter can be defined as:
Choose an answer
The final value of a loop
A variable that counts loop iterations
The initial value of a loop
The step value of a loop
Previous
Skip
Next
Question # 7
Semicolon is placed at the end of condition in:
Choose an answer
While loop
Do-while loop
For loop
All
Previous
Skip
Next
Question # 8
______ are used to move around the window if its contents do not fit on screen
Choose an answer
menu bar
Tool bar
Scroll bar
Status bar
Previous
Skip
Next
Question # 9
Which of the following is a loop statement?
Choose an answer
If
If-else
Switch
None
Previous
Skip
Next
Question # 10
If we want a user to enter exactly 20 values, which loop would be the best to use?
Choose an answer
While
Do-while
For
Infinite
Previous
Skip
Next
Question # 11
Which statement is used to move the control to the start of loop body?
Choose an answer
Continue
Break
Switch
Goto
Previous
Skip
Next
Question # 12
Which of the following statement can be used in C
Choose an answer
While
For
Do while
All
Previous
Skip
Next
Question # 13
If n=3, what will be the value of n after executing the following code?
do
n*=2
while (n<48);
Choose an answer
24
32
48
96
Previous
Skip
Next
Question # 14
A loop with in a loop is called:
Choose an answer
Nested loop
Complex loop
Infinite loop
Dual loop
Previous
Skip
Next
Question # 15
Which of the following loop is called counter loop?
Choose an answer
For
While
Do-while
All
Previous
Skip
Next
Back