Q577
What will be the output of the following C++ code? #include #include using namespace std; class A int a; public: virtual void func() = 0; ; class B: public A public: void func() cout<<"Class B"<<endl; ; int main(int argc, char const *argv[]) B b; b.func(); return 0;
A.
Class B
AnswerB.
Error
C.
Segmentation fault
D.
No output
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board