C++ Programming - Objects and Classes - Discussion
Discussion Forum : Objects and Classes - Programs (Q.No. 14)
14.
Which of the following statement is correct about the program given below?
#include<iostream.h>
class BixBase
{
int x, y;
public:
BixBase(int xx = 10, int yy = 10)
{
x = xx;
y = yy;
}
void Show()
{
cout<< x * y << endl;
}
};
class BixDerived
{
private:
BixBase objBase;
public:
BixDerived(int xx, int yy) : objBase(xx, yy)
{
objBase.Show();
}
};
int main()
{
BixDerived objDev(10, 20);
return 0;
}
Discussion:
3 comments Page 1 of 1.
Xzibit said:
1 decade ago
BixDerived(int xx, int yy) : objBase(xx, yy)
Initiator List for Bix Derived class.
Initiator List for Bix Derived class.
Ayush said:
1 decade ago
Can any class's constructor be inherited by any other class's constructor when the other class does not inherit the first class.
Richa said:
8 years ago
cout x.y=10*20 = 200.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers