What is the difference between a shallow copy and a deep copy?
Answer Posted / nashiinformaticssolutions
• 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 is the latest c++ version?
What are static type checking?
What is microsoft c++ redistributable?
You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()
Is it possible to pass an object of the same class in place of object reference to the copy constructor?
What are keywords in c++?
Why the usage of pointers in C++ is not recommended ?
List the types of polymorphism in c++?
Write a recursive program to calculate factorial in c++.
What is c++ & why it is used?
How should runtime errors be handled in c++?
Difference between pass by value and pass by reference?
What is the default width for ouputting a long integer using the insertion operator?
How to declare an array of pointers to integer?
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples