C++ Programming - Objects and Classes - Discussion

Discussion Forum : Objects and Classes - General Questions (Q.No. 7)
7.
Which of the following statements is correct about the constructors and destructors?
Destructors can take arguments but constructors cannot.
Constructors can take arguments but destructors cannot.
Destructors can be overloaded but constructors cannot be overloaded.
Constructors and destructors can both return a value.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
4 comments Page 1 of 1.

Vasu said:   9 years ago
Arguments are required only if they are going to perform anything inside the function.

Destructor does not perform any function, it just used for displaying purpose and to destroy an object.

Aakash said:   1 decade ago
Destructor can be overloaded?

Ash said:   1 decade ago
Why not destructor can take arguments ?

Chintan M K said:   1 decade ago
By eliminating options.

In A) constructors take arguments so eliminated.

In C) constructors can be overloaded.

In D) again true.

Post your comments here:

Your comments will be displayed after verification.