When i Compile this program then i can't input book2.title name, is it fault about using gets funtion then why? please explain it more ...........................
#include<stdio.h>
#include<string.h>
struct name{
char author[20];
char title[20];
float price;
};
int main()
{
    struct name book1,book2;
    printf("Enter 1st title name:");
    gets(book1.title);
    printf("Enter 1st Author name:");
    gets(book1.author);
    printf("Enter 1st Book price:");
    scanf("%f",&book1.price);
    printf("\nThe 1st Book Name is %s",book1.title);
    printf("\nThe 1st Book Author is %s",book1.author);
    printf("\nThe 1st Book Price is %f",book1.price);
    printf("\nEnter 2nd title name:");
    gets(book2.title);
    printf("Enter 2nd Author name:");
    gets(book2.author);
    printf("Enter 2nd Book price:");
    scanf("%f",&book2.price);
    printf("\nThe 2nd Book Name is %s",book2.title);
    printf("\nThe 2nd Book Author is %s",book2.author);
    printf("\nThe 2nd Book Price is %f",book2.title);
     return 0;
}
 
    