Which of the following statement is correct about destructors ?
A destructor has void return type
A destructor has no return type
A destructor has integer return type
A destructor return type is always same as that of main( )
How many default constructors can a class have ?
One
Two
Three
Unlimited
What is the return type of destructor ?
The class
Void
No return type
The same as the first data in the class
Which of the following gets called when an object goes out of scope ?
Constructor
Destructor
Main
Virtual function
How many types of constructors are there in C++ ?
1
2
3
4
How many times a constructor is called in the life-time of an object ?
Once
Twice
Thrice
Depends on the way of creation of object
Which of the following is used in copy constructor to receive its arguments ?
Either pass-by-value or pass-by-reference
Only pass-by-value
Only pass-by-reference
Only pass-by-address
Which of the following gets called when an object is being created?
Parameter
Argument
Which of the following statements are correct ?
Constructor is always called explicitly
Constructor is called either implicitly or explicitly, whereas destructor is always called implicitly
Destructor is always called explicitly
Constructor and destructor functions are not called at all as they are always inline
Which function is invoked automatically when an object is destroyed ?
Destructor function
Constructor function
Inline function
Friend function