1.

What is the output of this program?
#include <iostream>
using namespace std;
class Example
{
public:
Example()
{
cout << "N::N()" << endl;
}
Example( Example const & )
{
cout << "N::N( N const & )" << endl;
}
Example& operator=( Example const & )
{
cout << "N::operator=(N const &)" << endl;
}
};
Example function()
{
Example temp;
return temp;
}
int main()
{
Example p = function();
return 0;
}

A. N::N(N const & )
B. N
C. N::operator=(N const &)
D. N::N()
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs