
1.Create a class called student with following descriptions Data member : Rno - int Name - char[20] Std - int Mark1 int Mark2 - int Mark3 - int Member function Getdata() - To input details for students Putdata() - to dispaly details for students Create object for student class and input dispaly details.

The given code defines a class Student which describes two member functions. The function Getdata() accepts the student roll no, name and marks of three subjects from the user and Putdata() display this information.
#include <iostream>
#include <stdio.h>
#include <conio.h>
using namespace std;
class student
{
private :
int sno;
char name[20];
int m1,m2,m3;
public :
void Getdata()
{
cout << "Enter Student No. "; cin >> sno;
cout << "Enter Student Name "; cin >> name;
cout << "Enter Student 3subjects marks ";
cin >> m1 << m2 << m3;
}
void Putdata()
{
cout << "Student number :" << sno;
cout << "Student name :" << name;
cout << "Student marks :" << m1 << " " <<m2<<" "<<m3;
}
};
void main()
{
student s;
s.Getdata();
s.Putdata();
return 0;
}]