Question PSC-ARR-0014
MediumWhat 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][i]
end for
Print s
- A.
15
- B.
45
- C.
Sign up free to see the answer and a step-by-step explanation.