Page 214 - Computer science 868 Class 12
P. 214
6. The situation where the control moves from one case to another in the absence of ………………… statement is known as Fall
Through.
a. continue b. break
c. return d. All of these
7. When a switch is under another switch, then it is known as ………………… .
a. Nested loop b. Nested while
c. Nested do while d. Nested switch case
8. In …………………, flow of control is bidirectional.
a. switch case b. if else
c. loop d. Print statement
9. Java ………………… loop is known as exit controlled loop.
a. for b. while
c. do while d. None of these
10. ………………… loops are used for pausing the execution of the program for a period of time.
a. Null b. Finite
c. Nested d. Delay
Answers
1. a 2. b 3. c 4. a 5. c 6. b 7. d 8. b 9. c 10. d
B. Fill in the blanks:
1. There are ………………… types of control flow statements.
2. In Java, there are ………………… types of jump statements.
3. “while” loop and “do while” loop are known as ………………… iteration loop as the increment or decrement does not lie in front of
the loop.
4. for(int i=1; i<=10; i=i+1)
{
System.out.println(i);
}
This loop executes for ………………… times.
5. We can use two different types of loop together to apply the concept of ………………… loop.
6. Any loop that does not include any statement in the body of the loop is called ………………… loop.
7. The ………………… loop is known as entry controlled loop as the condition is checked before the loop starts executing.
8. The execution will ………………… when criteria in the condition do not match.
9. In …………………, the flow of control is multidirectional.
10. Conditional statements are of ………………… types.
Answers
1. four 2. three 3. unfixed 4. ten 5. nested 6. null
7. while 8. stop 9. switch case 10. two
C. Answer the following questions:
1. Convert the following while loop into for loop.
int i=1, j=1;
while(i<=5)
{
System.out.println(i+j);
i++;
j++;
}
212212 Touchpad Computer Science-XII

