#include<iostream.h> #include<conio.h> #include<stdio.h> //------------------------------- data --------------------------------// struct data { char name[25]; char section; } ns; //------------------------------ Student ------------------------------// struct student { int rollno; int semester; int age; data ns; }; main( ) { clrscr(); student genius; cout<<\"\\n -------- Use of structure --------- \\n\"<<endl; cout<<\"\\t Enter the Name = \"; gets(genius.ns.name); cout<<\"\\t Enter the Roll No = \"; cin>>genius.rollno; cout<<\"\\t Enter the Section = \"; cin>>genius.ns.section; cout<<\"\\t Enter the Semester = \"; cin>>genius.semester; cout<<\"\\t Enter the Age = \"; cin>>genius.age; clrscr(); cout<<\"\\n -------- Use of Nested Structure --------- \\n\"<<endl; cout<<\"\\t Name = \"<<genius.ns.name<<endl; cout<<\"\\t Roll No = \"<<genius.rollno<<endl; cout<<\"\\t Section = \"<<genius.ns.section<<endl; cout<<\"\\t Semester = \"<<genius.semester<<endl; cout<<\"\\t Age = \"<<genius.age<<endl; getch(); return 0; }