Initialization & Accessing Structure Members in C

C programming language treats a structure as a user-defined data type; therefore you can initialize a structure like a variable. Here is an example of initialize product structure: struct product { char name[50]; double price; } book = { “C programming language”, 40.5 }; In above example, we defined product structure, then we declare and … Read more