C++ Programming - Constructors and Destructors - Discussion

Discussion Forum : Constructors and Destructors - General Questions (Q.No. 17)
17.
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.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
13 comments Page 2 of 2.

Koniya said:   1 decade ago
What in case of virtual destructor? it means the destructor will have base class destructor na?

Azar Tamboli said:   1 decade ago
Distructor has tilde same name as that of class name.

Abhay said:   1 decade ago
We always create constructor within a class has a same name and distructor also have a same name as the name of class and constructor.


Post your comments here:

Your comments will be displayed after verification.