8
What will be the output of the program?
#include <iostream>
using namespace std;
class A { public: virtual void f() { cout << "A"; } virtual ~A() {} };
class B : public A { public: void f() override { cout << "B"; } };
int main() {
B b;
A &r = b;
r.f();
cout << endl;
return 0;
}Easy