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
Why is c++ so fast?
Tell me difference between constant pointer and pointer to a constant.
Explain all the C++ concepts using examples.
What do you mean by function pointer?
How does a C++ structure differ from a C++ class?
What is c++ manipulator?
What is meaning of in c++?
Can I learn c++ without knowing c?
What do manipulators do?
What is scope operator in c++?
Can I have a reference as a data member of a class? If yes, then how do I initialise it?
Do inline functions improve performance?
Why is it called c++?
Can we define a constructor as virtual in c++?
What are the extraction and insertion operators in c++? Explain with examples.