#include<stdio.h>
struct book{
       char name[12];
       float price;
       int pages;
       };
main()
{
   struct book b1;
   struct book *q;
   q = &b1;
   printf("Enter book name : ");
   gets(q->name);   
   printf("Enter price : ");
   scanf("%f", &q->price );  
   printf("Enter pages : ");
   scanf("%d", &q->pages );
   
   printf("you entered \n");
   printf("name : %s\n", b1.name);
   printf("price : %0.2f\n", b1.price);
   printf("pages : %d\n", b1.pages);
   
   system("pause");   
}
