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


What is difference between shallow copy and deep copy? Which is default?



What is difference between shallow copy and deep copy? Which is default?..

Answer / hrpynux@gmail.com

Default version of clone method creates the shallow copy of an object. To create the deep copy of an object, you have to override clone method. Shallow copy is preferred if an object has only primitive fields. Deep copy is preferred if an object has references to other objects as fields.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Generally variables are stored in heap memory. When he variables are created in stack?

4 Answers   Persistent,


Explain the different access specifiers for the class member in c++.

0 Answers  


What is a constant reference?

0 Answers  


Do we have private destructors?

12 Answers   Symphony, TCS,


Is c++ harder than java?

0 Answers  


what is the C++

1 Answers   Wipro,


Explain what you mean by a pointer.

0 Answers   TCS,


What is function prototyping? What are its advantages?

0 Answers  


Is ca high or low level language?

0 Answers  


How delete [] is different from delete?

0 Answers  


What is the maximum combined length of command line arguments including the space between adjacent arguments?

0 Answers  


What is the role of static keyword for a class member variable?

0 Answers  


Categories