What is a constructor? - Constructors allow initialization of objects at the time of their creation....
|
What are destructors? - Destructors are called automatically to destroy the object...
|
What are the restrictions apply to constructors and destructors? - Constructors and destructors don't return values......
|
Order in which constructors are called - The constructors of any virtual base classes are called first in the order of inheritance..
|
Difference between a copy constructor and an assignment operator - A copy constructor is used to declare and initialize an object from another object....
|
What is a virtual destructor? Explain the use of it - If the destructor in the base class is not made virtual, then an object that might have been declared of type base class and instance of child class.....
|
How should a contructor handle a failure? - Constructors don't have a return type, so it's not possible to use return codes....
|
What are shallow and deep copy? - A shallow copy just copies the values of the data as they are. Even if there is a pointer that points..
|
What is virtual constructors/destructors? - The explicit destroying of object with the use of delete operator to a base class pointer to the object...
|