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

Which is not a valid keyword a) public b) protected c) guarded

1260


How can an improvement in the quality of software be done by try/catch/throw?

1063


How are Structure passing and returning implemented by the compiler?

1131


Is empty stack c++?

993


Write about the stack unwinding?

1059


What are the various compound assignment operators in c++?

979


Is c++ a pure oop language?

1082


If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3

1376


Which format specifier is used for printing a pointer value?

1056


What is lazy initialization in c++?

1107


What is c++ best used for?

1064


What are static and dynamic type checking?

1082


What is c++ array?

1117


Are there any special rules about inlining?

1083


Explain storage qualifiers in c++.

1078