what will be the output :

#includeiostream
using namespace std;
class A
{
public:
A() { cout "\n A's constructor"; }
A(const A &a) { cout "\n A's Copy constructor"; }
A& operator= (const A &a)
{
if(this == &a) return *this;
cout "\n A's Assignment Operator"; return *this;
}
};
class B
{
A a;
public:
B(A &a):a(a) { cout "\n B's constructor"; }
};
int main()
{
A a;
B b(a);
return 0;
}


Posted on by