What is the output of following program?


			  		

Loading

โœช Choose the correct option.

What is the output of following program?

#include 
using namespace std;

class A
{
private:
int x;
public:
A(int _x) { x = _x; }
int get() { return x; }
};

class B
{
static A a;
public:
static int get()
{ return a.get(); }
};

int main(void)
{
B b;
cout << b.get();
return 0;
}

A. Compiler Error: Cannot access static a
B. Compiler Error: multiple functions with same name get()
C. Compiler Error: Undefined reference B::a
D. 0