Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Explain the difference between using macro and inline functions?

1125


Write a function that swaps the values of two integers, using int* as the argument type?

1031


What is singleton pattern in c++?

997


What is a singleton class c++?

1038


Explain unexpected() function?

1111


What are single and multiple inheritances in c++?

1103


write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;

1901


Will rust take over c++?

1061


what does the following statement mean? int (*a)[4]

1079


What is else syntax in c++?

1210


Why is it necessary to use a reference in the argument to the copy constructor?

1115


Explain the difference between abstract class and interface in c++?

987


Why are arrays usually processed with for loop?

1237


What are smart pointers?

2290


What is a catch statement?

1052