As the comments suggest, "string subscript out of range" means that you are trying to access an element of memory that is not part of the student object. You say you have limited the call to student[11] to student[20]. Are you sure this is in range? Try printing out the variables at each stage of the process, before and after statements that change the variable's value and every time around the loop and see if the data is what you think it should be.
I'm not sure what you are trying to do with this loop, but maybe it would be easier to extract the data you want out of the student array first, and then assign it to the answer array.