How many types of constructors are there in C++ ?
1
2
3
4
Which of the following statement is incorrect ?
Constructor is a member function of the class
Constructor should be declared in the public sections
Constructor can be referenced using their addresses
They can have default arguments
When an object is created which function will be automatically invoked ?
Friend function
Destructor function
Static function
Constructor function
Which of the following statement is correct ?
A destructor has the same name as the class in which it is present
A destructor has a different name than the class in which it is present
A destructor always returns an integer
A destructor can be overloaded
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
What is called default constructor ?
A constructor that accepts one parameter
A constructor that accepts two parameters
A constructor that accepts no parameter
A constructor that accepts three parameters
For automatic objects, constructors and destructors are called each time the objects :
Enter and leave scope
Inherit parent class
Are constructed
Are destroyed
Which constructor allows objects to be created without passing any parameters ?
Parameterized constructor
Copy constructor
Default constructor
Public constructor
Which of the following are NOT provided by the compiler by default ?
Zero-argument constructor
Destructor
Dynamic constructor
Which of the following gets called when an object goes out of scope ?
Constructor
Main
Virtual function