Weekend Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmasmnth

Which code, inserted at line 5, generates the output "ABC"?

Which code, inserted at line 5, generates the output "ABC"?

#include

using namespace std;

class A {

public:

//insert code here

};

class B:public A {

public:

void Print(){ cout<< "B"; }

};

class C:public B {

public:

void Print(){ cout<< "C"; }

};

int main()

{

A ob1;

B ob2;

C ob3;

A *obj;

obj = &ob1;

obj?>Print();

obj = &ob2;

obj?>Print();

obj = &ob3;

obj?>Print();

}

A.

void Print(){ cout<<"A";}

B.

virtual void Print(){ cout<<"A";}

C.

virtual void Print(string s){ cout<

D.

None of these

C++ Institute CPA-21-02 Summary

  • Vendor: C++ Institute
  • Product: CPA-21-02
  • Update on: Aug 2, 2025
  • Questions: 257
Price: $52.5  $149.99
Buy Now CPA-21-02 PDF + Testing Engine Pack

Payments We Accept

Your purchase with ExamsVCE is safe and fast. Your products will be available for immediate download after your payment has been received.
The ExamsVCE website is protected by 256-bit SSL from McAfee, the leader in online security.

examsvce payment method