C++ Programming - Constructors and Destructors

Exercise :: Constructors and Destructors - General Questions

16. 

Constructors __________ to allow different approaches of object construction.

A. cannot overloaded
B. can be overloaded
C. can be called
D. can be nested

Answer: Option B

Explanation:

No answer description available for this question. Let us discuss.

17. 

Which of the following statement is correct?

A. A destructor has the same name as the class in which it is present.
B. A destructor has a different name than the class in which it is present.
C. A destructor always returns an integer.
D. A destructor can be overloaded.

Answer: Option A

Explanation:

No answer description available for this question. Let us discuss.

18. 

Which of the following cannot be declared as virtual?

A. Constructor
B. Destructor
C. Data Members
D. Both A and C

Answer: Option D

Explanation:

No answer description available for this question. Let us discuss.

19. 

If the copy constructor receives its arguments by value, the copy constructor would

A. call one-argument constructor of the class
B. work without any problem
C. call itself recursively
D. call zero-argument constructor

Answer: Option C

Explanation:

No answer description available for this question. Let us discuss.

20. 

Which of the following are NOT provided by the compiler by default?

A. Zero-argument Constructor
B. Destructor
C. Copy Constructor
D. Copy Destructor

Answer: Option D

Explanation:

No answer description available for this question. Let us discuss.