ECAT Computer Science MCQS Set 6

ECAT Computer Science MCQS Page 2


In which loop the condition comes before the body of the loop?
While loop
Do-while loop
For loop
B and C

Where should be the loop control variable initialized?
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

The keyword used to come out of the body of loop is
Break
Exit
Continue
Ebd

The keyword used to transfer control from the body of loop to the start of loop is
Continue
Exit
Break
End

Which of the following loop is called counter loop?
For
While
Do-while
All

When is for loop more appropriate then while loop?
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

A counter can be defined as:
A variable that counts loop iterations
The final value of a loop
The initial value of a loop
The step value of a loop

This statement may be used to stop a loop’s current iteration and begin once:
Continue
Break
Terminate
Next

Which of the following is a loop statement?
None
If
If-else
Switch

Each record consists of a
Both a and b 
Rows
Columns
None of these

Which of the following statement can be used in C
All
While
For
Do while

What is the value of “a” after execution the following code segment:
int a=2;
int b=0;
while(b<5)
{a=a*2;
b=b+1;
a=a+1;
65
64
66
67

______ are used to enter data into databases
Tables
Queries
Reports
Forms

Be the first to comment

Leave a Reply

Your email address will not be published.


*