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
What is malloc in c++?
Explain queue. How it can be implemented?
Write a program to add three numbers in C++ utilizing classes.
How can you quickly find the number of elements stored in a dynamic array?
What are shallow and deep copies?
What information can an exception contain?
What are the defining traits of an object-oriented language?
Write is a binary search tree? Write an algo and tell complexity?
How do I use arrays in c++?
What is scope in c++ with example?
What problems might the following macro bring to the application?
Difference between strdup and strcpy?
What are stacks?
Can I uninstall microsoft c++ redistributable?
When you overload member functions, in what ways must they differ?