Question PSC-ARR-0052
MediumWhat will be printed by the following pseudocode?
Integer a[6] = {1, 2, 3, 4, 5, 6}
Integer i, t = a[0]
for (each i from 0 to 4)
a[i] = a[i + 1]
end for
a[5] = t
Print a[0], a[5]
- A.
2 6
- B.
6 1
- C.
2 1
- D.
1 6
Sign up free to see the answer and a step-by-step explanation.