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 difference between method overloading and method overriding in c++?
Does c++ have foreach?
What is scope resolution operator in c++ with example?
what is the use of templates?
How does com provide language transparency?
What is a catch statement?
What is an operator function? Describe the function of an operator function?
In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that
what is static function
What is setbase c++?
Can user-defined object be declared as static data member of another class?
Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. [ I ended up giving about 4 or 5 different solutions for this, each supposedly better than the others ].