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 statement is correct ?
Destructor has the same name as that of the class with a tilde symbol
Constructor has the same name as that of the class
Both a and b
Destructor has the same name as the first member function of the class
Which constructor allows objects to be created without passing any parameters ?
Parameterized constructor
Copy constructor
Default constructor
Public constructor
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 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
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 are NOT provided by the compiler by default ?
Zero-argument constructor
Dynamic constructor
How many default constructors can a class have ?
One
Two
Three
Unlimited