1.

Define Shallow And Deep Copy?

Answer»

A SHALLOW copy just copies the VALUES of the data as they are. Even if there is a pointer that points to dynamically allocated MEMORY, the pointer in the copy will POINT to the same dynamically allocated.

A shallow copy just copies the values of the data as they are. Even if there is a pointer that points to dynamically allocated memory, the pointer in the copy will point to the same dynamically allocated.



Discussion

No Comment Found