Answer the questions (i) and (ii) after going through the following class :
class Exam
{
int Rollno;
char Cname[25];
float Marks ;
public :
Exam( ) //Function 1
Rollno = 0 ;
Cname=””;
Marks=0.0;
}
Exam(int Rno, char candname) //Function 2
{
Rollno = Rno ;
strcpy(Cname,candname);
}
~Exam( ) //Function 3
{
cout << “Result will be intimated shortly” << endl ;
}
void Display( ) //Function 4
{
cout << “Roll no :”<<Rollno;
cout<<”Name :” <<Cname;
cout <<” Marks:”<<Marks;
}
} ;
(i) Which OOP concept does Function 1 and Function 2 implement.Explain?
(ii) What is Function 3 called? When will it be invoked?