About Me

My photo
gandhinagar, gujarat, India
hi.. friends i'am student of kv crpf gandhinagar..and i would like to spread my view and thinking on computer..this blog is for not only those who wants to get knowledge.

Thursday, 5 May 2011

structure to create your own data type in c..........

struct book_info
char title[10];
char author_name[10];
int pages;
float price;
void main()
struct book_info book1,book2;
  printf("enter the information about the book = ");
  printf("\n\n\t\t\t\tthe details of book are below:-\n");
  printf("title = %s\n\nauthor_name = %s\n\npages = %d\n\nprice =                %f",book1.title,book1.author_name,book1.pages,book1.price);   


Post a Comment