GATE CS 2000 · Arrays & Matrix Representation

MCQ · 1 mark · Problem PROG-DSTR-0254

An \(n \times n\) array \(v\) is defined as follows:\(v\left[i,j\right] = i - j\) for all \(i, j, i \leq n, 1 \leq j \leq n\)The sum of the elements of the array \(v\) is
  1. A
    0
  2. B
    n-1
  3. C
    \(n^2 - 3n +2\)
  4. D
    \(n^2 \frac{\left(n+1\right)}{2}\)

Solve it on GATE DA practice →More Basic Data Structures problems

Show the worked solutionOfficial GATE Answer Key: Option A.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/625/gate2000-1-2

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