MCQs>IT & Programming>C++>Suppose MyClass is a class that defines a copy constructor and overloads the assignment operator. In which of the following cases will the copy constructor of MyClass be called?
C++ MCQs
Suppose MyClass is a class that defines a copy constructor and overloads the assignment operator. In which of the following cases will the copy constructor of MyClass be called?
Answer
Correct Answer: When an object of MyClass is passed by value to a function
Explanation:
Note: This Question is unanswered, help us to find answer for this one