adspace


when can we use copy constructor?

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


Please Help Members By Posting Answers For Below Questions

What is the latest version on c++?

1209


What character terminates all character array strings a) b) . c) END

1397


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

1165


Can union be self referenced?

1267


daily Routine of father

1485