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

How is c++ used in the real world?

0 Answers  


what Is DCS ? what i will get benefit when i did?

0 Answers  


What is an opaque pointer?

1 Answers  


Difference between inline functions and macros?

0 Answers  


Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?

0 Answers  






simple c++ program for "abcde123ba" convert "ab321edcba" with out using string

5 Answers  


What is a template in c++?

0 Answers  


What's c++ used for?

0 Answers  


What is ios :: in in c++?

0 Answers  


How would you use qsort() function to sort an array of structures?

0 Answers  


Explain how a pointer to function can be declared in C++?

0 Answers  


let a,b,c be three integer numbers.write a c++ program with a function void rotate 1()such that a->b->c and c->a.

1 Answers  


Categories