Page 230 - CA_Blue( J )_Class9
P. 230
MIND DRILL
Solved Questions
A. Tick ( ) the correct answer.
1. Which loop contains initialisation, condition for testing and increment or decrement in the same line?
a. for b. while
c. do while d. None of these
2. While writing ascending order program we use ………………… relational operator in condition for testing.
a. > b. <
c. >= d. All of these
3. Java for loop executes a set of statements repeatedly for a ………………… number of times.
a. Uncertain b. Fixed
c. Unfixed d. Same
4. ………………… is example/s of "entry control loop”.
a. for b. do-while
c. while d. both a and c
5. If the test condition is checked after executing the body of the loop, then it is called ………………….
a. exit control loop b. entry control loop
c. post-test loop d. iterative control loop
6. Continue statement is used as ………………… statement.
a. jump b. return
c. break d. all of these
7. Which loop ends with a semicolon (;)?
a. for b. while
c. do-while d. all of these
8. for(i=1;i>=0;i++)
{
System.out.println("Loop");
}
It is a/an ………………….
a. finite loop b. infinite loop
c. Null loop d. body less loop
9. int i=5; This part is the ………………… of a loop
a. Increment b. Condition
c. Initialisation d. job
10. How many times the loop will execute?
int i=45;
for(;i>=5;i=i-5)
{
228 Touchpad Computer Applications-IX

