#include &lt;iostream&gt;    using namespace std;    class sample    &#123;        public:        sample&#40;&#41;         &#123;              cout &lt;&lt; &quot;X::X()&quot; &lt;&lt; endl;         &#125;        sample&#40; sample const &amp; &#41;         &#123;              cout &lt;&lt; &quot;X::X( X const &amp; )&quot; &lt;&lt; endl;        &#125;        sample&amp; operator=&#40; sample const &amp; &#41;        &#123;             cout &lt;&lt; &quot;X::operator=(X const &amp;)&quot; &lt;&lt; endl;        &#125;    &#125;;    sample f&#40;&#41;     &#123;        sample tmp;        return tmp;    &#125;    int main&#40;&#41;     &#123;        sample x = f&#40;&#41;;        return 0;    &#125;
A. X::operator=(X const &)
B. X::X( X const & )
C. X::X()
D. None of the mentioned
Answer:A
#include &lt;iostream&gt;    using namespace std;    class sample    &#123;        public:        sample&#40;&#41;         &#123;              cout &lt;&lt; &quot;X::X()&quot; &lt;&lt; endl;         &#125;        sample&#40; sample const &amp; &#41;         &#123;              cout &lt;&lt; &quot;X::X( X const &amp; )&quot; &lt;&lt; endl;        &#125;        sample&amp; operator=&#40; sample const &amp; &#41;        &#123;             cout &lt;&lt; &quot;X::operator=(X const &amp;)&quot; &lt;&lt; endl;        &#125;    &#125;;    sample f&#40;&#41;     &#123;        sample tmp;        return tmp;    &#125;    int main&#40;&#41;     &#123;        sample x = f&#40;&#41;;        return 0;    &#125;
A. X::operator=(X const &) B. X::X( X const & ) C. X::X() D. None of the mentioned
Explanation:As we are passing the object without any attributes it will return as X::X().