Junior — Senior
What output will the program produce when run
livecode
Task condition
Specify what text will appear in the console after executing the following code.
class A {
public:
void f() { std::cout << "A"; }
};
class B : public A {
public:
void f() { std::cout << "B"; }
};
void g(A &a) { a.f(); }
int main() {
B b;
g(b);
}