As I said last night, it wasn't necessary to make 'item' a pointer, but it's just as well that you did. It's more efficient to send the function a pointer to a struct rather than making an extra copy of the entire struct -- this would be important if you were dealing with a large structure.
Anyway, your segfault is due to one little detail in student.c. Access the array like this
Code:
(*array)[*number_of_elements] = *item;
or
Code:
*(*array + *number_of_elements) = *item;
By the way, I don't like the idea of reusing a typename to name a field in the structure, as in
although apparently the compiler doesn't mind. I just think that's looking for trouble/confusion.
Also, do you really want the arraysize to double every time it runs out of space? That may be OK going from 1 to 2 and 2 to 4, but do you really want to jump from 16 to 32, and so on?