Sometimes we may require to store the information of one entity in one group. But this information may consist of different variables of different data types. At this stage if we need to refer all variables with the same name, then we require to use the data type called as structure.

syntax

struct struct_name
 {
 data members;
 }variable name;

Structure is a small body which allows users to declare different variable of different data types and use them with the same name of structure.

EXAMPLE

struct student
 {
 int rollno;
 char name[20];
 }s;

 

VIDEO TUTORIAL