Vidyalelo
C++ Programming · Q7

Constructors and Destructors in C++

Programming · C++ Programming · question 7

Q7

What is the difference between a shallow copy and a deep copy in C++?

A.
Shallow copy is performed using copy constructors, while deep copy is performed using assignment operators
B.
Shallow copy copies only the memory addresses of the objects, while deep copy copies the actual content
Answer
C.
Shallow copy is faster than deep copy
D.
None of the above

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board