ECAT Computer Science MCQS Page 2
In which loop the condition comes before the body of the 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
The keyword used to transfer control from the body of loop to the start of loop is
Which of the following loop is called counter loop?
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:
Which of the following is a loop statement?
Each record consists of a
Both a and b
None of these
Which of the following statement can be used in C
What is the value of “a” after execution the following code segment:
______ are used to enter data into databases