Which code, inserted at line 18, generates the output “AB”

Which code, inserted at line 18, generates the output “AB”
#include using namespace std;
class A
{ public: void Print(){ cout<< "A";} void Print2(){ cout<< "a";} }; class B:public A { public: void Print(){ cout<< "B";} void Print2(){ cout<< "b";} }; int main() { B ob2; //insert code here ob2.Print(); } A. ob2?>A::Print();
B. ob2.B::Print();
C. ob2?>B::Print();
D. ob2.A::Print();

Download Printable PDF. VALID exam to help you PASS.

Posted in: CPA

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.