What is the difference between a shallow copy and a deep copy?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
• 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 |
write the code that display the format just like 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1 6 5 4 3 2 1
char *ch = "abcde"; char c[4]; how to copy 'ch' to 'c'?
How do you declare a set in c++?
What is an adaptor class in c++?
What will happen if I allocate memory using "new" and free it using "free" or allocate sing "calloc" and free it using "delete"?
Why c++ is created?
what is upcasting in C++?
What it is and how it might be called (2 methods).
When does a name clash occur in c++?
What and all can a compiler provides by default?
How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array?how can you find the nodes with repetetive data in a linked list?
What is a unnitialised pointer?