programming tip do not forget to place semicolon after the declaration of structures and unions }data_type var-namefor exampleif we have to define structure for studentthen the related information for student probably would beroll_numbernamecourseand fees this structure can be declared asstruct student int r_nochar name[ ]char course[ ]float fees}now the structure has become user-defined data type each variable name declared within structure is called member of the structure the structure declarationhoweverdoes not allocate any memory or consume storage space it just gives template that conveys to the compiler how the structure would be laid out in the memory and also gives the details of member names like any other data typememory is allocated for the structure when we declare variable of the structure for examplewe can define variable of student by writingstruct student stud struct student stud r_no name course fees struct student stud r_no name course fees figure memory allocation for structure variable herestruct student is data type and stud is variable look at another way of declaring variables in the following syntaxthe variables are declared at the time of structure declaration struct student int r_nochar name[ ]char course[ ]float feesstud stud in this declaration we declare two variables stud and stud of the structure student so if you want to declare more than one variable of the structurethen separate the variables using comma when we declare variables of the structureseparate memory is allocated for each variable this is shown in fig note structure type and variable declaration of structure can be either local or global depending on their placement in the code last but not the leaststructure member names and names of the structure follow the same rules as laid down for the names of ordinary variables howevercare should be taken to ensure that the name of structure and the name of structure member should not be the same moreoverstructure name and its variable name should also be different typedef declarations the typedef (derived from type definitionkeyword enables the programmer to create new data type name by using an existing data type by using typedefno new data is createdrather an