/* PROGRAM OF A CLASS */
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
class STUDENT
{ int RN;
char NAME[20];
float MARKS;
public:
void ENTER();
void VIEWALL();
};
void STUDENT::ENTER()
{
cout<<" ENTER VALUES : "<<endl;
cout<<" ENTER ROLL NO. : ";
cin>>RN;
cout<<" ENTER NAME : ";
gets(NAME);
cout<<" ENTER MARKS: ";
cin>>MARKS;
}
void STUDENT::VIEWALL()
{ cout<<"\n OUTPUT : "<<endl;
cout<<" ROLL NO. : " <<RN<<endl;
cout<<" NAME : " <<NAME<<endl;
cout<<" MARKS : " <<MARKS<<endl;
}
void main()
{clrscr();
STUDENT S;
[Link]();
[Link]();
getch();
}
OUTPUT :-