StreakPeaked· Practice

ExamsGATETechnical

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

  1. X(i) = X(i − 1) + I(i); Y(i) = Y(i − 1)I(i); i > 0
  2. X(i) = X(i − 1)I(i); Y(i) = Y(i − 1) + I(i); i > 0
  3. X(i) = X(i − 1)I(i); Y(i) = Y(i − 1)I(i); i > 0
  4. X(i) = X(i − 1) + I(i); Y(i = Y(i − 1)I(i − 1); i > 0

Correct answer: X(i) = X(i − 1) + I(i); Y(i) = Y(i − 1)I(i); i > 0

Solution

The correct option accurately describes the relationship between the inputs and outputs, where the output X is the cumulative sum of the inputs, while Y is the product of the previous Y value and the current input, reflecting the operations performed at each iteration.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →