struct people
{
char *name;
char *surname;
} *human;
human = malloc(10*sizeof(struct people));
Hello everyone. I am trying to acccess elements of this struct array but I think I am doing it wrong.
I tried this to access second element's name string
human[1].name;
And when it didn't worked I tried this
human[1.sizeof(struct people)].name;
Thanks in advance