Page 1 of 1

What is output by the following code? Class A public: virtual std::string foo() { return "A"; } }; class B : public A pu

Posted: Mon May 02, 2022 12:06 pm
by answerhappygod
What Is Output By The Following Code Class A Public Virtual Std String Foo Return A Class B Public A Pu 1
What Is Output By The Following Code Class A Public Virtual Std String Foo Return A Class B Public A Pu 1 (23.29 KiB) Viewed 20 times
What is output by the following code? Class A public: virtual std::string foo() { return "A"; } }; class B : public A public: virtual std::string foo() { return "B"; } }; class C : public Af public: virtual std::string foo() { return "C"; } class D : public c public: virtual std::string foo() { return "D"; } }; Aa = new BO; C C = new D): std::cout << a->fco() << std::endl; Select one: OB OD ос OA