Page 324 - C++
P. 324
2. (a) Which function(s) out of the following can be considered as
overloaded function(s) in the same program ? Also, write the reason
for not considering the other(s) as overloaded function(s). 2
void Execute(char A,int B); // Function 1
void Execute(int A,char B); // Function 2
void Execute(int P=10); // Function 3
void Execute(); // Function 4
int Execute(int A); // Function 5
void Execute(int &K); // Function 6
(b) Observe the following C++ code and answer the questions (i) and (ii).
Note : Assume all necessary files are included.
class FIRST
{
int Num1;
public:
void Display() //Member Function 1
{
cout<<Num1<<endl;
}
};
class SECOND: public FIRST
{
int Num2;
public:
void Display() //Member Function 2
{
cout<<Num2<<endl;
}
};
void main()
{
SECOND S;
_______________ //Statement 1
_______________ //Statement 2
}
91 5 P.T.O.