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
ICS Part 2 Computer Science Chapter 12 Online Test MCQs With Answers
Question # 1
A loop whose execute never ends is called
Choose an answer
Nested loop
Forever loop
Infinite loop
Counter loop
Previous
Skip
Next
Question # 2
A ________ is used to perform the same sequence of steps or automating tasks repeatedly
Choose an answer
Macro
Module
Forms
Reports
Previous
Skip
Next
Question # 3
This is a control structure that causes a statement or group of statement to repeat:
Choose an answer
Decision statement
Duration
Iteration
Test
Previous
Skip
Next
Question # 4
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 # 5
______ 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 # 6
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 # 7
The loop which never ends is called:
Choose an answer
Infinite loop
Running loop
Continuous loop
Nested loop
Previous
Skip
Next
Question # 8
This statement causes a loop to terminate early?
Choose an answer
Break
Terminate
Exit
A and B
Previous
Skip
Next
Question # 9
The keyword 'break' cannot be used within:
Choose an answer
Do-while
If-else
For
While
Previous
Skip
Next
Question # 10
One execution of a loop is known as a(n):
Choose an answer
Cycle
Duration
Iteration
Test
Previous
Skip
Next
Question # 11
The body of while loop with multiple statements ends with:
Choose an answer
Right bracket ]
Right brace }
Comma ,
Semi colon ;
Previous
Skip
Next
Question # 12
The body of for loop with single statement ends with:
Choose an answer
Right bracket ]
Right brace }
Comma ,
Semi colon ;
Previous
Skip
Next
Question # 13
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 # 14
In a for statement, this expression is executed only once:
Choose an answer
Test
Validation
Initialization
All
Previous
Skip
Next
Question # 15
Which of the following statement can be used in C
Choose an answer
While
For
Do while
All
Previous
Skip
Next
Question # 16
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 # 17
________ 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 # 18
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 # 19
This means to increase a value by one:
Choose an answer
Modulus
Increment
Decrement
Inc
Previous
Skip
Next
Question # 20
What is the value of "a" after the execution of the following code?
int a 25;
for(int c=0; c<4;c++)
a=a-1;
a=1+3;
Choose an answer
23
24
25
20
Previous
Skip
Next
Back