What is the difference between deep copy and shallow copy?

Question

help me with this question

Answer ( 1 )

    0
    2025-02-22T06:15:56+00:00
    • Shallow Copy: Copies only the memory address (can cause issues with dynamic memory).
    • Deep Copy: Creates a new copy of the object along with allocated memory.

Leave an answer