CAT 1999 — QA Question 38
BasicsEasy
Passage / Data
Directions: Answer the questions based on the following information.
A robot moves on a graph sheet with X and Y-axis. The robot is moved by feeding it with a sequence of instructions. The different instructions that can be used in moving it, and their meanings are:
âââââââ
The robot reaches point (6, 6) when a sequence of three instructions is executed, the first of which is a GOTO(x,y) instruction, the second is WALKX(2) and the third is WALKY(4). What are the value of x and y?
Answer & solution
- A
2, 4
- B
0, 0
4, 2
- D
2, 2
Solution
The final point is (6, 6). The previous point is (6, 2) and the one before is (4, 2).