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

How does throwing and catching exceptions differ from using setjmp and longjmp?

1 Answers  


Can I create my own functions in c++?

0 Answers  


Is there a new/delete equivalent of realloc?

1 Answers  


What are the characteristics of friend functions?

0 Answers  


How to change constant values?

6 Answers   Huawei, Symphony,


What is atoi?

0 Answers  


What is type of 'this' pointer? Explain when it is get created?

0 Answers  


Explain object slicing in c++?

0 Answers  


Which is the best c++ software?

0 Answers  


Can I run c program in turbo c++?

0 Answers  


Why do we learn c++?

0 Answers  


Define Virtual function in C++.

0 Answers   iNautix,


Categories