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

What is the difference between prefix and postfix versions of operator++()?

1134


Is c++ a good beginners programming language?

1125


Why can templates only be implemented in the header file?

1142


what are the iterator and generic algorithms.

1989


Is c better than c++?

1133


What's the order in which the local objects are destructed?

1307


Why main function is special in c++?

1171


Comment on assignment operator in c++.

1169


Can you be able to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?

1156


What are virtual constructors/destructors?

1076


What are the various storage classes in C++?

1184


What is std :: flush?

1129


Write a program which uses Command Line Arguments

1232


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

1231


What are manipulators in c++ with example?

1113