New ! Computer Science MCQ Practise Tests



11th Standard English Medium Computer Science Subject Composition and Decomposition Book Back 5 Mark Questions with Solution

11th Standard

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 01:00:00 Hrs
Total Marks : 25

    5 Marks

    5 x 5 = 25
  1. 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.

  2. 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.

  3. 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.

  4. 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 < nf
    , i := f × i, i+1

  5. Explain case analysis in detail with an example.

*****************************************

Reviews & Comments about 11th Standard English Medium Computer Science Subject Composition and Decomposition Book Back 5 Mark Questions with Solution

Write your Comment