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
When does the code block following while (x<100) execute?
Choose an answer
When x is less then one hundred
When x is greater then one hundred
When x is equal to one hundred
None
Previous
Skip
Next
Question # 2
The keyword 'break' cannot be used within:
Choose an answer
Do-while
If-else
For
While
Previous
Skip
Next
Question # 3
Which of the following is a loop statement?
Choose an answer
If
If-else
Switch
None
Previous
Skip
Next
Question # 4
Which of the following statement can be used in C
Choose an answer
While
For
Do while
All
Previous
Skip
Next
Question # 5
A loop with in a loop is called:
Choose an answer
Nested loop
Complex loop
Infinite loop
Dual loop
Previous
Skip
Next
Question # 6
A loop whose execute never ends is called
Choose an answer
Nested loop
Forever loop
Infinite loop
Counter loop
Previous
Skip
Next
Question # 7
Where should be the loop control variable initialized?
Choose an answer
Before the loop starts
In the first statement of the loop body
In the last statement of the loop body
Anywhere in the loop body
Previous
Skip
Next
Question # 8
The loop which never ends is called:
Choose an answer
Infinite loop
Running loop
Continuous loop
Nested loop
Previous
Skip
Next
Question # 9
The loop structure that executes at least ones is
Choose an answer
While
Do-while
For
All
Previous
Skip
Next
Question # 10
In which loop the condition comes before the body of the loop?
Choose an answer
While loop
Do-while loop
For loop
B and C
Previous
Skip
Next
Question # 11
Which loop structure always executes at least once?
Choose an answer
Do-while
For
While
All
Previous
Skip
Next
Question # 12
The keyword used to come out of the body of loop is
Choose an answer
Exit
Continue
Break
Ebd
Previous
Skip
Next
Question # 13
One execution of a loop is known as a(n):
Choose an answer
Cycle
Duration
Iteration
Test
Previous
Skip
Next
Question # 14
In a for statement, this expression is executed only once:
Choose an answer
Test
Validation
Initialization
All
Previous
Skip
Next
Question # 15
________ contains icon button that are shortcuts to the commands in the menu
Choose an answer
Menu bar
Tool bars
Scroll bar
Status bar
Previous
Skip
Next
Question # 16
When is for loop more appropriate then while loop?
Choose an answer
The termination condition is known in advance
The number of iterations is not known in advance
The loop should be executed only once
The loop should be executed at least once
Previous
Skip
Next
Question # 17
While loop is also called:
Choose an answer
Conditional loop
Wend loop
Counter loop
Continuous loop
Previous
Skip
Next
Question # 18
A for statement contains three expressions: Initialization, test and:
Choose an answer
Assignment
Validation
Increment / decrement
All
Previous
Skip
Next
Question # 19
What is the final value of x after executing the following code:
For (int x=0; x<10; X++)
Choose an answer
10
9
0
1
Previous
Skip
Next
Question # 20
Each record consists of a
Choose an answer
Rows
Columns
Both a and b
None of these
Previous
Skip
Next
Back