Here is my code:

```
struct student_name {
    char first_name[50];
    char middle_name[50];
    char last_name[50];
};

struct student_information {
    struct student_name name;
}

void set_new_student(struct student_information **info, int *studCount) {
    (*studCount)++;
    *info = realloc(*info, *studCount * sizeof(struct student_information));

    printf("Enter the Student data:\n");
    printf("First name: "); scanf("%s",(*info)[(*studCount)].name.first_name);
    printf("Middle name: "); scanf("%s",(*info)[(*studCount)].name.middle_name);
    printf("Last name: "); scanf("%s",(*info)[(*studCount)].name.last_name);

    printf("%d\n",sizeof(*info));

     return;
}

int main() {
    struct student_information* student = NULL;
    int student_counter = 0;
    for(int i=0; i<5; i++)
      set_new_student(&student, &student_counter);
}

```

when I call this function from the main function with loop it working for the first 2 iterations but in the third one it gives me a run time error also the print state meant print 4 all the time and I think the size should change, isn't it?