First it output's the number in array corresponding to the i index (which increments by 1 each iteration).
Second it outputs i as long as j-- is greater than 0, lets look at what happens.
First iteration:
j = i (i is 1 now)
output 1st element in array
is 1-- > 0? Yes
Second Iteration:
j = i (i is 2 now)
output the 2nd element in array
is 2-- > 0? Yes
^
see that's what i expect to happen too!
but instead in the first iteration:
i = 1
j = i
outputs a[1] which is 20
then 1-- > 0? yes... so it should output i which is 1.. but instead it only outputs 20...
that's why im confused.