What is difference between shallow copy and deep copy? Which is default?
Default version of clone method creates the shallow copy of an object. To create the deep copy of an object, you have to override clone method. Shallow copy is preferred if an object has only primitive fields. Deep copy is preferred if an object has references to other objects as fields.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the default width for ouputting a long integer using the insertion operator?
What do you mean by ‘void’ return type?
What is c++ stringstream?
What are move semantics?
How to change constant values?
Which algorithm do you like the most? Why?
What is data structure in c++?
Difference between linked list and array?
What are proxy objects?
Explain the difference between c & c++?
write a c++ program that gives output 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 using looping statement
Why pointer is used in c++?