GATE CS 2025 · Set-2 · Numerical Computation & Estimation

MCQ · 2 marks · Problem GA-QUAN-0025

Which one of the following options is correct for the given data in the table?\[\begin{array}{|c|c|c|c|c|} \hline \text{Iteration} (i) & 0 & 1 & 2 & 3 \\ \hline \text{Input} (I) & 20 & -4 & 10 & 15 \\ \hline \text{Output} (X) & 20 & 16 & 26 & 41 \\ \hline \text{Output} (Y) & 20 & -80 & -800 & -12000 \\ \hline \end{array}\]
  1. A
    \(X(i) = X(i - 1) + I(i); \quad Y(i) = Y(i - 1) I(i); \quad i > 0\)
  2. B
    \(X(i) = X(i - 1) I(i); \quad Y(i) = Y(i - 1) + I(i); \quad i > 0\)
  3. C
    \(X(i) = X(i - 1) I(i); \quad Y(i) = Y(i - 1) I(i); \quad i > 0\)
  4. D
    \(X(i) = X(i - 1) + I(i); \quad Y(i) = Y(i - 1) I(i - 1); \quad i > 0\)

Solve it on GATE DA practice →More Section 2: Quantitative Aptitude problems

Show the worked solutionTest each rule on the table for \(i=1,2,3\).\[\boxed{X:\ 20-4=16,\ 16+10=26,\ 26+15=41\ \Rightarrow\ X(i)=X(i-1)+I(i)}\]\[\boxed{Y:\ 20\times(-4)=-80,\ -80\times10=-800,\ -800\times15=-12000\ \Rightarrow\ Y(i)=Y(i-1)\,I(i)}\]Options B and C use a product for \(X\), giving \(X(1)=-80\neq16\). Option D's \(Y(i-1)\,I(i-1)\) gives \(Y(1)=20\times20=400\neq-80\).Answer: A

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com