Question: Given the following structure definition:
struct Book
{
char title[100];
char author[50];
int pages;
float price;
};
a) Write a C program snippet to initialize a variable of type `struct Book` with the title "C Programming", author "John Doe", 500 pages, and a price of $29.99.
b) How would you print out the details of the book using `printf`?
Structure in c is a user-defined data type that enables us to store the collection of different data types. "struct "key word to define structure. Eg Syntax struct structure name { Data type No1 Data type No2 Data type No3 ... ... .............. Upto n }; Eg struct bike { char company[50]; char user_name[20]; int price; };