1.

Declaring a copy constructor doesn’t suppresses the compiler generated copy assignment operator.(a) True(b) FalseI got this question in an interview.I need to ask this question from Assigning Objects in chapter Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming

Answer»

Correct OPTION is (a) True

To explain: Even if the PROGRAMMER doesn’t define or even if they define the COPY constructor. The compiler STILL generates a copy ASSIGNMENT operator. It doesn’t gets suppressed.



Discussion

No Comment Found

Related InterviewSolutions