Question
Which one of the following options is correct for the given data in the table?
| Iteration (i) | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| Input (I) | 20 | -4 | 10 | 15 |
| Output (X) | 20 | 16 | 26 | 41 |
| Output (Y) | 20 | -80 | -800 | -12000 |
Official answer and solution
- Official answer
- A
- From
- Official GATE 2025 answer key
Solution
Check how and are computed from the previous output and current input for .
From the table:
- For : , , and . Thus for .
- For : , , and . Thus for .
Final answer
Option (A)
Common trap
Selecting (D) without noticing instead of in the formula for .
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2025 Computer Science and Information Technology - Session 2 (CS2)
- Question
- 8 of 65
- Section
- General Aptitude
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.