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