First of all, I think there's a problem with this :



if (index == 20)

I don't think your index will never reach 20 cause an array index start from 0 not from 1.

As Norm said, it will be...