What is the difference between a shallow copy and a deep copy?
Answer Posted / glibwaresoftsolutions
• Shallow Copy: Copies memory addresses. Changes in one object affect the other.
• Deep Copy: Creates a new copy of the actual data, independent of the original.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are static variables?
What is atoi?
Can constructor be private in c++?
What are vectors used for in c++?
When to use “const” reference arguments in a function?
What are member functions used in c++?
Is c++ built on c?
What is lvalue?
What is the need of a destructor? Explain with the help of an example.
What is rvalue?
How do you clear a set in c++?
Describe the advantage of an external iterator.
Define the operators that can be used with a pointer.
How are pointers type-cast?
What does new do in c++?