#include<iostre am.h>
#include<conio. h>
struct student
{
char name [20];
int age;
int roll;
};
void main();
{
clrscr();
student a;
cout<<"please enter name: ";
cin>>a.name;
cout<<"please enter age: ";
cin>>a.age;
cout<<"please enter roll no: ";
cin>>a. roll;
cout<<"the name is: "<<a.name;
cout<<"the age is: "<<a.age;
cout<<"the roll no is: "<<a.roll;
getch()
};
#include<conio. h>
struct student
{
char name [20];
int age;
int roll;
};
void main();
{
clrscr();
student a;
cout<<"please enter name: ";
cin>>a.name;
cout<<"please enter age: ";
cin>>a.age;
cout<<"please enter roll no: ";
cin>>a. roll;
cout<<"the name is: "<<a.name;
cout<<"the age is: "<<a.age;
cout<<"the roll no is: "<<a.roll;
getch()
};
Comment