What is the difference between shallow copy and deep copy?
Answer Posted / 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 View All Answers
Can we run c program in turbo c++?
What is :: operator in c++?
Define a constructor - what it is and how it might be called (2 methods)?
What's the order in which the objects in an array are destructed?
What can c++ be used for?
When does a 'this' pointer get created?
What is guard code in c++?
How do you initialize a string in c++?
Explain the difference between abstract class and interface in c++?
Can a program run without main?
What is the meaning of string in c++?
Define the process of error-handling in case of constructor failure?
If a header file is included twice by mistake in the program, will it give any error?
Difference between delete and free.
What is a lambda function c++?