x.sage); printf(â
the student name is %s â
x.sname); getch(); } 9. Nested Structure: The technique of placing one structure variable as a member of anther structure is called ânested structureâ or âstructure with in structureâ Program: #include #include struct Student { int sno; flaot sage; char sname[10]; struct Marks { }x; }y; int m; int p; int c; void main() { clrscr(); printf(â
enter student numberâ); scanf(â%dâ
&x.sno); printf(â
enter student ageâ); scanf(â%fâ
&x.sage); printf(â
enter student nameâ); scanf(â%sâ
&x.sname); printf(â
enter Maths marksâ); scanf(â%dâ
&x.y.m); printf(â
enter Physics marksâ); scanf(â%dâ
&x.y.p); printf(â
enter Computers marksâ); scanf(â%dâ
&x.y.c); printf(â
the student number is %d â
x.sno); printf(â
the student ahe is %f â
x.sage); printf(â
the student name is %s â
x.sname); printf(â
the Maths marks is %d â
x.y.m); printf(â
the Physics marks is %d â
x.y.p); printf(â
the Computers marks is %d â
x.y.c); getch();} 10. Array of Structures :Declaring an array of structure is same as declaring an array of fundamental types. Since an array is a collection of elements of the same type. In an array of structures
each element of an array is of the structure type.