Skip to main content

Creation of a structure variable

There are two different ways to create structure variable

 struct StudentInfo 

{

 int Rno; 

char Sname[20]; 

float Percentage;  

}s1, s2; 

struct StudentInfo 

 { 

 int Rno; 

 char Sname[20]; 

 float Percentage;  

 }; use

struct StudentInfo s1,s2; 

Here s1 and s2 are structure variables of structure StudentInfo. 

Creation of a structure variable reserves memory space.


Comments