This
student[j].first_name = malloc(sizeof(char) * MAX_CHARS_IN_NAME);
student[j].last_name = malloc(sizeof(char) * MAX_CHARS_IN_NAME);
is worse than this
Type: Posts; User: Tclausex
This
student[j].first_name = malloc(sizeof(char) * MAX_CHARS_IN_NAME);
student[j].last_name = malloc(sizeof(char) * MAX_CHARS_IN_NAME);
is worse than this
Then do what we all do - get out a pencil and paper and diagram your data objects so can see what you have and/or what you want to have.
You don't "need" pointers, you could just as viably have...
Why do you think you can treat student as an array of structs
fscanf(ifp, "%s", student[j].first_name);
when you pointed it to an allocation for a single struct?
person *student =...