#### 11th Standard Computer Science Iteration and recursion English Medium Free Online Test One Mark Questions with Answer Key 2020 - 2021

11th Standard

Reg.No. :
•
•
•
•
•
•

Computer Science

Time : 00:10:00 Hrs
Total Marks : 10

10 x 1 = 10
1. We wish to cover a chessboard with dominoes,ロロ the number of black squares and the number of white squares covered by dominoes, respectively, placing a domino can be modeled by

(a)

b:= b + 2

(b)

w:= w + 2

(c)

b, w := b + 1, w + 1

(d)

b:= w

2. Which of the following is not an invariant of the assignment? m, n := m+2, n+3

(a)

m mod 2

(b)

n mod 3

(c)

3 x m - 2 x n

(d)

2 x m - 3 x n

3. Using this recursive definition
$a^n= \begin{cases}1 & \text { if } n=0 \\ a \times a^{n-1} & \text { otherwise }\end{cases}$
how many multiplications are needed to calculate a10?

(a)

11

(b)

10

(c)

9

(d)

8

4. The unchanged variables of the loop body is called loop _______.

(a)

condition

(b)

loop statement

(c)

loop variable

(d)

loop invariant

5. Which of the following is more powerful algorithms design technique closely related to iteration?

(a)

Specification

(b)

Abstraction

(c)

Recursion

(d)

Decomposition

6. Which of the following is a recursive solver case?

(a)

Base case

(b)

Recursive case

(c)

loop case

(d)

Both a and b

7. Which one is odd?

(a)

at the start of the loop (just before the loop)

(b)

at the start of each iteration (before loop body)

(c)

at the end of each iteration (after loop body)

(d)

at the middle of the loop (just before the loop)

8. If L is a loop variant, then it should be true at __________ important points in the algorithm.

(a)

2

(b)

3

(c)

4

(d)

5

9. In an expression if the variables has the same value before and after an assignment, then it is __________of an assignment.

(a)

variant

(b)

Invariant

(c)

iteration

(d)

variable

10. When the solver calls a sub solver, then it is called _________.

(a)

Iterative call

(b)

solver call

(c)

recursive call

(d)

conditional call