I know I sound like a broken record, but whenever you declare a structure like this:
You create extra work for yourself because you have to use the 'struct' keyword excessively, like so:
struct test_score* temp = malloc(sizeof(struct test_score) * NUM_OF_SUBJECT);
struct test_score test[NUM_OF_SUBJECT];
I mean, doing it that was is the way it was done with the 1.0 C standard of years an years ago- clumsy, overly verbose.
If you tell it it is an actual 'type' of data, it's much simpler-- like this:
See how much simpler and easier this is:
test_score* temp = malloc(sizeof(test_score) * NUM_OF_SUBJECT);