LogiQuest
Back to Inheritance
5

What will be the output of the program?

#include <iostream>
using namespace std;
class A { public: A() { cout << "A"; } };
class B { public: B() { cout << "B"; } };
class C : public B, public A { public: C() { cout << "C"; } };
int main() { C c; return 0; }
Hard

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.