what is mistake ? i cant find any mistake in my code but it does not take input properly and it also displays some garbage values. Thanks:
int main()
{
    struct book
    {
        char name;
        int price;
        int pages;
    };
    struct book b[5];
    int i;
    for (i = 0; i < 5; i++)
    {
        printf("enter name price pages\n");
        scanf("%c", &b[i].name);
        scanf("%d", &b[i].price);
        scanf("%d", &b[i].pages);
    }
    for (i = 0; i < 5; i++)
        printf("%c %d %d\n", b[i].name, b[i].price, b[i].pages);
    return 0;
}
 
     
     
     
     
     
     
     
    