After defining the type student (which is a struct made of two arrays of characters and an int), I've created an array of pointers to student, which I need in order to modify its content inside of a series of functions.
int main(void)
{
student* students[NUMBER_OF_STUDENTS];
strcpy(students[0]->name, "test");
strcpy(students[0]->surname, "test");
students[0]->grade = 18;
return EXIT_SUCCESS;
}
My problem is that this simple piece of code returns -1 as exit status after running. Why is that?