You're stepping out of bounds of your 'students' array.
Remember that array indexes start at zero... not at one. So this:
for(int i = 1; i <= class_size; i++)
Is wrong because you are looping over index [1] and [2].
[2] is an invalid index. Since the size of the array is 2... that means [0] and [1] are valid indexes.
For this reason, the typical for loop starts at zero and counts up to the size (but not = to the size). IE:
for(int i = 0; i < class_size; i++) // <- start at 0. < instead of <=