7
What will be the output of the program?
#include <iostream>
using namespace std;
class A { public: int x = 1; };
class B : public A { public: int y = 2; };
int main() {
B b;
cout << b.x + b.y << endl;
return 0;
}Easy