What is the difference between shallow copy and deep copy?
A shallow copy constructs a new compound object and then (to the extent possible) inserts references into it to the objects found in the original. A deep copy constructs a new compound object and then, recursively, inserts copies into it of the objects found in the original.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is std namespace in c++?
what are Access specifiers in C++ class? What are the types?
Define a nested class.
Floating point representation and output seems to be compiler dependent?
class X { private: int a; protected: X(){cout<<"X constructor was called"<<endl;} ~X(){cout<<"X destructor was called"<<endl} }; Referring to the code above, which one of the following statements regarding "X" is TRUE? a) X is an abstract class. b) Only subclasses of X may create X objects. c) Instances of X cannot be created. d) X objects can only be created using the default copy constructor. e) Only friends can create instances of X objects.
What is diamond problem in c++?
Implement strcmp
What is an object in c++?
What are the differences between a struct and a class in C++?
What is a block in c++?
What is a class template in c++?
What is difference between initialization and assignment?
12 Answers HCL, HP, Infosys,