I have written this program as described in Walkthrough week 4 in structs 0 but it is not working, Kindly point out the mistake Thanks a lot.
# include <stdio.h>
# include <cs50.h>
# include "struct.h"
# define STD 3
int main (void)
{
student students[STD];
int i=0;
for (i=0;i<STD;i++)
{
printf("enter name\n");
students[i].name= GetString();
printf("Adress\n");
students[i].house = GetString();
}
for (int y=0;y<STD;y++)
{
printf("students name is %s lives in %s\n\n", students[i].name, students[i].house);
}
for (int x=0;x<STD;x++)
{
free (students[i].name);
free (students[i].house);
}
}