✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
What will the program output and which C++ feature determines this result?#include <iostream> class A{public: virtual void Foo() { std::cout << "A::Foo"; } void Bar() { Foo(); }}; class B : public A{public: void Foo() override { std::cout << "B::Foo"; }}; int main(){ A* obj = new B(); obj->Bar(); delete obj;}