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 |
How many pointers are required to reverse a link list?
How do you compile the source code with your compiler?
What are the advantages of inheritance in c++?
Given the following function definition: int doit(int &x, int y, int &z) { x = 3*x; y = y + 5; z = x+y; return z - 4; } int a = 5, b = 7, c = 9, d = 11; d = doit(a,b,c);
Do vectors start at 0?
What is c++ prototype?
what is the diff b/n c and c++ a. dynamic scoping b. nested switching c. declaration of variables in any code block d. separation of compilation and linking
What is a modifier in c++?
What is the return value of the insertion operator?
What is function prototyping?
To what does “event-driven” refer?
Can you pass an array to a function in c++?