
36 Data Structures Using C
struct student
{
char name [20];
int age;
int roll;
char class [5];
}
stud1, stud2;
In the above declaration, the structure declaration and the variable declaration of the structure type
have been clubbed, i.e., the structure declaration is followed by two variable names stud1 and stud2 and
the semicolon.
1.13.2 Referencing Structure Elements
The structure variable x has four members: name, age, roll, and class. These members can be designated
as: x.name, x.age, x.roll, and x.class, respectively. In this notation, an individual member of the structure
is designated or qualified by the structure variable