Consider the following C++ code and answer the questions from (i) to (iv) :
class Personal:
{
int Class, Rno; char Section; protected:
char Name[20];
public:
Personal();
void Pentry();
void Pdisplayf();
};
class Marks:private Personal
{
float M[5];
protected:
char Grade[5];
public:
Marks();
void Mentry();
void Mdisplay();
};
class Result : public Marks
{
float Total, Agg;
public:
char FinalGrade,Comments[20];
Result();
void Rcalculate();
void Rdisplayt();
};
(i) Which type of inheritance is shown in the above example ?
(ii) Write the names of those data members,
which can be directly accessed from the objects of
class result.
(iii) Write the names of those member functions,
which can be directly accessed from the objects
of class Result.
(iv) Write the names of those data members,
which can be directly accessed from the Mentry() function
of class Marks.