When you declare a variable of this structured type C makes a variable of the correct size. This means that, if you know how much memory int , float and char variables take up, you can work out how much memory any given structure needs. However, since C has already done this for you, it seems a little silly to have to do it manually. This returns the number of locations which the item takes up in memory. C keeps track of pointer types for us.
C knows how many memory locations that a customer record takes, so it moves down memory that amount.
When you want to get hold of one of the members of a structure which you are pointing at you have to tell C to de-reference the pointer to the structure and then return the required member. You do this by replacing the . Defining your own Types We have created our own types above, we can use them in our programs to hold specific kinds of data. However, we have to go through all the rigmarole of putting struct customer each time we want to declare a variable of that type. Also, at other points in the program we may want to use particular data types which mean something to us, how about a data type called inches which allows us to store values of inches.