Discussion :: Objects and Classes
-
Which of the following statement is correct about the program given below?
#include class BixBase { int x, y; public: GateBase(int xx = 10, int yy = 10) { x = xx; y = yy; } void Show() { coutclass GateDerived : { private: GateBase objBase; public: GateDerived(int xx, int yy) : GateBase(xx, yy) { objBase.Show(); } }; int main() { GateDerived objDev(10, 20); return 0; }
|
A.
The program will print the output 100. |
|
B.
The program will print the output 200. |
|
C.
The program will print the output Garbage-value. |
|
D.
The program will report compile time error. |
Answer : Option A
Explanation :
No answer description available for this question.
Be The First To Comment

Whatsapp
Facebook