 Here are three different brands of peanut butter each with their net weight serving size and price We're going to write a program that finds the price per serving and price per hundred grams for each of these brands Here's the program Where each piece of data is represented by an individual variable for each brand we do the calculations and Print the results. Here's what the program looks like when we run it There's absolutely nothing wrong with this code The problem is in how we're thinking about the data The weight the serving size and price really aren't totally separate variables the way they're written here They belong together What you'd like to do is collect these separate variables into a single data structure The way you do that in C is to start with the struct keyword and Then give a name for your data structure We'll call it food so that it can be used for more than just peanut butter and then in braces We list the things that are associated with each food Every food has a weight Every food has a serving size and a price These components of the data structure are called the data structure members Now instead of needing nine separate variables We need three variables that are struct food variables one for brand one one for brand two and One for brand three To initialize a data structure You give the values for the members in the same order that they appear in the definition brand one was 454 grams weight with a 32 grams serving size and cost 499 Similarly brand two was for 40 grams 32 grams serving size for 299 and Our data for brand three Since we no longer have nine separate variables. We have to change this code here Now instead of an independent variable We use dot notation Dot notation is best read from right to left. We want to access the price member Belonging to the brand one variable or if you prefer reading left to right We could say the brand one variable Contains a member called weight which we want to access and similarly We change this all to dot notation Let's make the same changes for the rest of the program rebuild and run again and It still works The advantage of a data structure is that it makes your programs more understandable By allowing you to keep related data together