Instructions

Directions for the next 2 questions: 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 through 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.

Question 123

# After executing a sequence of three instructions, bottle A contains one litre of water. The first and the third of these instructions are shown below: First instruction: FILL (C, A) Third instruction: FILL (C, A) Then which of the following statements about the instruction is true?

Solution

After first instruction: A = 5-2 = 3L. C = 2L. In the third instruction, A yields 2L to C. It means the capacity of A before third operation was 3L. It means that C's water was either drained or transferred to B. Option B is correct.