Question PSC-ARR-0076
HardWhat will be printed by the following pseudocode?
Integer a[4][4], i, j, s = 0
for (each i from 0 to 3)
for (each j from 0 to 3)
a[i][j] = i * 4 + j
end for
end for
for (each i from 0 to 3)
s = s + a[i][i] + a[i][3 - i]
end for
Print s
- A.
60
- B.
120
- C.
Sign up free to see the answer and a step-by-step explanation.