C++ Constructors Questions and Answers
1. |
Constructor should be declared under the scope .......... |
|
- A. public
- B. private
- C. protected
- D. pointer
|
2. |
Which of the following is not true? |
|
- A. destructors cannot be overloaded
- B. constructors cannot be overloaded
- C. constructors is executed automatically
- D. constructors can have parameters
|
3. |
Which of the following is a function that removes the allocated memory of an object? |
|
- A. constructor
- B. copy constructor
- C. destructor
- D. member function
|
4. |
The constructor without any parameter is called as ......... |
|
- A. default constructor
- B. instance constructor
- C. initial constructor
- D. parameterized constructor
|