Question PSC-ARR-0044
MediumWhat will be the output of the following pseudocode?
Integer a[6] = {2, 4, 6, 8, 10, 12}
Integer i
for (each i from 1 to 5)
a[i] = a[i] + a[i - 1]
end for
Print a[5], a[2]
- A.
42 6
- B.
22 12
- C.
Sign up free to see the answer and a step-by-step explanation.