1.

What will be the output of the following program?

#include<iostream.h>
class BixBase
{ public: BixBase() { cout<< "Base OK. "; }
};
class BixDerived: public BixBase
{ public: BixDerived() { cout<< "Derived OK. "; } ~BixDerived() { cout<< "Derived DEL. "; }
};
int main()
{ BixBase objB; BixDerived objD; objD.~BixDerived(); return 0;
}

A. Base OK. Derived OK. Derived DEL.
B. Base OK. Base OK. Derived OK. Derived DEL.
C. Base OK. Derived OK. Derived DEL. Derived DEL.
D. Base OK. Base OK. Derived OK. Derived DEL. Derived DEL.
E. The program will report compile time error.
Answer» E. The program will report compile time error.


Discussion

No Comment Found

Related MCQs