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