/* */ Click to Join Live Class with Shankar sir Call 9798158723

Tagged structure in C ?


In tagged structure struct can be followed by an identifier this identifier is called tag name. The structure definition associated with a tag name is called tagged structure.


Syntax:-
struct tag_name
{
type 1;
type 2;
};


Example of tagged structure:-
 void main()
 {
 struct stu
 {
 int roll;
 char name[10];
 };
 printf(“enter roll”);
 scanf(“%d”,&stu.roll);
 printf(“enter name”);
 scanf(“%c”,stu.name);
 printf(“%d”, roll);
 printf(“%c”,name);
 getch();
 }