What is the difference between shallow copy and deep copy?



What is the difference between shallow copy and deep copy?..

Answer / hrpynux@gmail.com

A shallow copy constructs a new compound object and then (to the extent possible) inserts references into it to the objects found in the original. A deep copy constructs a new compound object and then, recursively, inserts copies into it of the objects found in the original.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Differentiate between a pointer and a reference with respect to c++.

0 Answers  


What are arrays c++?

0 Answers  


iam a fresher to Qt(GUI a c++ based framework software). i need to develop the basic applications on designer by drag and dropping mechanism...so pls send me the procedure to design applications?

1 Answers  


Is swift faster than c++?

0 Answers  


What is the Difference between "C structure" and "C++ structure"?

12 Answers  






Explain the use of vtable.

0 Answers  


Does std endl flush?

0 Answers  


Explain the difference between realloc() and free() in c++?

0 Answers  


How to declaring variables in c++?

0 Answers  


What is a storage class? Mention the storage classes in c++.

0 Answers  


Define pre-condition and post-condition to a member function in c++?

0 Answers  


Tell me what are static member functions?

0 Answers  


Categories