I am confused about how to input from the keyboard into a struct
struct people{
char name[20];
int age;
char sex[10];
};
void input_data(struct people *in_str);
int main()
{................some code..................}
void input_data(struct people *in_str)
{
printf("Enter name >");
gets (people.name) //whats the difference between this
gets(in_str->name)..........// and this i know this
//is a pointer
//but now i've come across this on
printf(" enter name >");
fseek(stdin, OL, SEEK_SET); //is stdin necessary here
fgets(people.name, 20, stdin);//and here
It's gettin a bit confusing and i'm startin to go bald