CAT 2000 — QA Question 31
Answer the following question based on the information given below.
There are three bottles of water, A, B, C, whose capacities are 5 litres, 3 litres, and 2 litres respectively. For transferring water from one bottle to another and to drain out the bottles, there exists a piping system. The flow thorough these pipes is computer controlled. The computer that controls the flow through these pipes can be fed with three types of instructions, as explained below.
âââââââ
Initially, A is full with water, and B and C are empty.
Consider the same sequence of three instructions and the same initial state mentioned above. Three more instructions are added at the end of the above sequence to have A contain 4 litres of water. In this total sequence of six instructions, the fourth one is DRAIN (A). This is the only DRAIN instruction in the entire sequence. At the end of the execution of the above sequence, how much water (in litres) is contained in C?
Answer & solution
- A
One
- B
Two
Zero
- D
None of these
After third instruction A has 1 litre, B has 2 litres and C has 2 litres of water.
Instruction 4: DRAIN A
Instruction 5: EMPTY (B, A)
Instruction 6: EMPTY (C, A)
After 6th instruction, C has no water as all 2 litres have been transferred to A.
Hence, option (c).