I'm very very new in programming, so i don't know how to solve the problem. As you can see, I want to make a program that outputs location that you want. There is, also, typedef struct for location variables.
char location[25];
printf("Which place info you want? (Home, School): ");
scanf("%s", location[25]);
if(!strcmp(location[25], "home"))
{
printf("%s\n", home.country);
printf("%s\n", home.city);
printf("%s\n", home.street);
printf("%s\n", home.building_number);
}
else if(!strcmp(location[25], "school"))
{
printf("%s\n", school.country);
printf("%s\n", school.city);
printf("%s\n", school.street);
printf("%s\n", school.building_number);
}
else
{
printf("I don't have an info about this place\n");
}