C++ Institute CPA - C++ Certified Associate Programmer CPA-21-02 Question # 8 Topic 1 Discussion

C++ Institute CPA - C++ Certified Associate Programmer CPA-21-02 Question # 8 Topic 1 Discussion

CPA-21-02 Exam Topic 1 Question 8 Discussion:
Question #: 8
Topic #: 1

What happens when you attempt to compile and run the following code?

#include

using namespace std;

class A {

public:

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

};

class C:public A {

public:

virtual void Print()=0;

};

int main()

{

C obj3;

obj3?>Print();

}


A.

It prints: BB


B.

It prints: A


C.

It prints: AB


D.

Compilation error


Get Premium CPA-21-02 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.