#### Composition and Decomposition Model Question Paper

11th Standard

Reg.No. :
•
•
•
•
•
•

Computer Science

Time : 01:00:00 Hrs
Total Marks : 50
5 x 1 = 5
1. Which notation is similar to programming languages?

(a)

Pseudo code

(b)

Flowchart

(c)

Statements

(d)

Decomposition

2. Which of the following is a diagrammatic notation for representing algorithms?

(a)

Pseudo code

(b)

Programming language

(c)

Flowchart

(d)

Source code

3. An algorithm expressed in the programming language is called

(a)

statement

(b)

program

(c)

information

(d)

function

4. Which of the following is not a programming language?

(a)

C

(b)

C++

(c)

Ms-office

(d)

Python

5. Which of the following is the most widely used notation to represent algorithms?

(a)

Flowchart

(b)

Pseudo code

(c)

English language

(d)

all of these

6. 5 x 2 = 10
7. What is a Pseudocode?

8. What are the 3 important control flow statements?

9. What is meant by Decomposition?

10. When a condition statement will be executed?

11. Write the algorithm specification to find minimum of 2 numbers.

12. 5 x 3 = 15
13. What are the disadvantage of using flowchart?

14. Name the three control flow statement.

15. How the sequential statement represented in a flowchart?

16. Draw a flowchart that depicts iterative control flow.

17. Explain conditional statement.

18. 4 x 5 = 20
19. Exchange the contents: Given two glasses marked A and B. Glass A is full of apple drink and glass B is full of grape drink. Write the specification for exchanging the contents of glasses A and B, and write a sequence of assignments to satisfy the specification.

20. Circulate the contents: Write the specification and construct an algorithm to circulate the contents of the variables A, B and C as shown below: The arrows indicate that B gets the value of A, C gets the value of B and A gets the value of C.

21. Decanting problem. You are given three bottles of capacities 5 ,8 and 3 litres. The 8L bottle is filled with oil, while the other two are empty. Divide the oil in 8L bottle into two equal quantities. Represent the state of the process by appropriate variables. What are the initial and final states of the process? Model the decanting of oil from one bottle to another by assignment. Write a sequence of assignments to achieve the final state.

22. Trace the step-by-step execution of the algorithm for factorial(4). factorial(n)
--inputs: n is an integer, n > 0
-- outputs: f = n!
f, i := 1 ,1 while i < n
f, i := f X i, i1+