Question PSC-ARR-0016
HardWhat will be the output of the following pseudocode?
Integer m[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}
Integer s = 0
for (each i from 0 to 2)
s = s + m[i][2 - i]
end for
Print s
- A.
15
- B.
12
- C.
18
- D.
9
Sign up free to see the answer and a step-by-step explanation.