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...

tell about copy constructor

Answer Posted / madhu

Basic thing, copy constructor will be called whenever a copy
is made. and copy constructors are called when:
1. create a new object using existing object.
2. When is returning to caller.
3. When an object is passed by value as a parameter to a
function

Basically a default copy constructor will be created which
does bitwise copy also know as shallow copy.
This will become a problem when we are dealing with dynamic
memory allocation for variables and leads to dangling pointer.
To overcome we have to override by deep copy.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is polymorphism explain its types?

1097


What does sksksk mean in text slang?

2053


What is new keyword in oops?

992


can inline function declare in private part of class?

4300


What is a null tree?

1077


What is difference between polymorphism and inheritance?

1019


What is overloading in oops?

1091


Why do pointers exist?

1044


How to use CMutex, CSemaphore in VC++ MFC

4736


How do you achieve polymorphism?

1036


Why is there no multiple inheritance?

952


IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?

2019


any one please tell me the purpose of operator overloading

2338


program for insertion ,deletion,sorting in double link list

2623


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1809