Ok, this I didn't know:
I have this in my code:
#define MAXSTU 100
I then have this array:
char names_and_courses[MAXSTU][2][30];
So I was having the problem outlined above, couldn't find anywhere where I was trying to access elements past the end of my array anywhere like Matt suggested. Then I change MAXSTU to 50 and hey presto, problem solved. But why is this, perhaps somebody coukd let me know, thx.