Question PSC-ARR-0032
EasyWhat will be the output of the following pseudocode?
Integer a[] = {1, 2, 3, 4}
for (each i from 1 to 3)
a[i] = a[i] + a[i - 1]
end for
Print a[3]
- A.
10
- B.
7
- C.
Sign up free to see the answer and a step-by-step explanation.