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

Can you please explain the difference between static and dynamic binding of functions?

0 Answers  


In which memory a class gets stored(in heap /in stack)? And why??

2 Answers  


How do you clear a buffer in c++?

0 Answers  


write a c++ program to create class student having datamember name,Roll_no,age,and branch intilcization all the member using constructor print the all the details on the screen.

0 Answers  


What do you mean by persistent and non persistent objects?

1 Answers  


check whether a no is prime or not.

3 Answers   TCS,


What is purpose of abstract class?

0 Answers  


What is the arrow operator in c++?

0 Answers  


When is a template better solution than a base class??

2 Answers   emc2,


differance between copy & clon

1 Answers   Microsoft,


What is the use of bit fields in structure declaration?

0 Answers  


Do class declarations end with a semicolon? Do class method definitions?

0 Answers  


Categories