C++ Constructors Questions and Answers
| 9. |
When an object is passed by reference to constructor, the constructor that is executed is .......... |
| |
- A. static
- B. default
- C. inline
- D. copy
|
| 10. |
Which of the following is a function that removes the allocated memory of an object? |
| |
- A. constructor
- B. destructor
- C. member fucntion
- D. copy constructor
|
| 11. |
The name of constructor must be ......... |
| |
- A. same as object name
- B. same as one of the member function
- C. same as class name
- D. none of these
|
| 12. |
Which of the following has no return type and cannot be overloaded? |
| |
- A. constructor
- B. destructor
- C. inline function
- D. member function
|