C++ Programming - Constructors and Destructors - Discussion
Discussion Forum : Constructors and Destructors - General Questions (Q.No. 17)
17.
Which of the following statement is correct?
Discussion:
13 comments Page 1 of 2.
Vilady said:
6 years ago
The constructor has the same name as the class, and the destructor's name isnt the same as the constructors, which means the destructor's name is not the same as the class' name.
(1)
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.
Sabareesh said:
1 decade ago
Destructor has come with with tilde symbol prefix to class name (constructor don't require any special symbol for execution).
Ravindra said:
1 decade ago
If your derived class destructor is virtual then objects will be destructed in a order (firstly derived object then base).
(1)
Koniya said:
1 decade ago
What in case of virtual destructor? it means the destructor will have base class destructor na?
Emilio said:
10 years ago
In my opinion A and ~A are different names, so the B should be the right answer.
Azar Tamboli said:
1 decade ago
Distructor has tilde same name as that of class name.
Naveen said:
7 years ago
Can you explain why destructor cannot be overloaded?
Kaustubh said:
8 years ago
Destructors cannot be overloaded. Am I right?
Vivetha said:
8 years ago
Destructor cannot be overloaded.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers