Destructor is a member function whose name is same as the class name but is preceded by a ………..
A destructor is used to destroy the objects that have been created by a ………………..
Whenever const objects try to invoke non-const member functions, the compiler …………………
Allocation of memory to objects at the time of their construction is known as ……………. of objects.
The process of initializing through a copy constructor is known as ……………
……………….. provides the flexibility of using different format of data at runtime depending upon the situation.
An ………………….. with a constructor or destructor cannot be used as a member or a union.
Can destuctors be private in C++?
Like constructors, can there be more than one destructors in a class?
Can destructors be virtual in C++?
Which among the following is called first, automatically, whenever an object is created?
Which among the following is not a necessary condition for constructors?
Which among the following is correct?
In which access should a constructor be defined, so that object of the class can be created in any function?
How many types of constructors are available for use in general (with respect to parameters)?
4
5
SHOW ANSWERIf a programmer defines a class and defines a default value parameterized constructor inside it.
He has not defined any default constructor. And then he try to create the object without passing arguments, which among the following will be correct?
Default constructor must be defined, if parameterized constructor is defined and the object is to be created without arguments.
If class C inherits class B. And B has inherited class A. Then while creating the object of class C, what will be the sequence of constructors getting called?