Code:#include<stdio.h> struct book { char name; char author; int pages; float price; }; void main() { struct book b1[100]; int i; int n; printf("how many books"); scanf("%d",&n); for(i=0;i<n;i++) { printf("Enter name of book %d\n",i+1); scanf("%s",&b1[i].name); printf("Enter author of book %d\n",i+1); scanf("%s",&b1[i].author); printf("Enter page length of book %d\n",i+1); scanf("%d",&b1[i].pages); printf("Enter price of book %d\n",i+1); scanf("%f",&b1[i].price); } printf("You entered"); for(i=0;i<n;i++) printf("Name %s\n author %s\n pages %d\n price %f\n",b1[i].name,b1[i].author,b1[i].pages,b1[i].price); }
the code is wroking it accepts user inputs but "You entered" not executes. that is i want to write information what user has type
no errors in code but not showing me "you entered" information
whats wrong in last printf() statement