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 / namitha

A copy constructor is used in the following cases.
-When an object is created from another object of the same
type.
-When an object is passed by value as a parameter to a
function.
-When an object is returned from a pointer.
-when we want to set a default value for the data members.

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to declare an array of pointers to integer?

1069


what is C++ exceptional handling?

1092


Explain the difference between c & c++?

1019


Is java as fast as c++?

1045


How would you obtain segment and offset addresses from a far address of a memory location?

1027


What is a block in c++?

981


What is meant by entry controlled loop? What all C++ loops are exit controlled?

1015


What are the basic data types used in c++?

998


Can a program run without main function?

1090


Which is best c++ or java?

1041


What is the difference between while and do while loop?

1085


What are the advantages of using const reference arguments in a function?

1021


What are enumerations?

1051


Explain how to initialize a const data member.

1071


What are the various oops concepts in c++?

967