Answer Posted / sagarson
Copy constructors are called in following cases:
a) when a function returns an object of that class by value
b) when the object of that class is passed by value as an
argument to a function
c) when you construct an object based on another object of
the same class
d) When compiler generates a temporary object
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
Explain the difference between using macro and inline functions?
Write a function that swaps the values of two integers, using int* as the argument type?
What is singleton pattern in c++?
What is a singleton class c++?
Explain unexpected() function?
What are single and multiple inheritances in c++?
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;
Will rust take over c++?
what does the following statement mean? int (*a)[4]
What is else syntax in c++?
Why is it necessary to use a reference in the argument to the copy constructor?
Explain the difference between abstract class and interface in c++?
Why are arrays usually processed with for loop?
What are smart pointers?
What is a catch statement?