logo

Crowdly

Please, write what will be the output after the execution of the F() function...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Please, write what will be the output after the execution of the F() function.

In case of compilation error please, write C, in case of runtime error please, write R.

class A { public:     virtual void print()const { cout << "AC"; };     virtual void print() { cout << "A"; }; };  class B : public A { public:     void print()const { cout << "BC"; }     void print() { cout << "B"; } };  void F() {         const A a;     B b;     a.print();     b.print();     const A* p = &a;     p->print();     p = &b;     p -> print(); };

More questions like this

Want instant access to all verified answers on softserve.academy?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!