why constructor cannt be declar virtually?
why destructor cannt be overloaded?

Answers were Sorted based on User's Feedback



why constructor cannt be declar virtually? why destructor cannt be overloaded?..

Answer / subhashish sen

Constructor can't be virtual,becoz constructor is an entity
which initializes V-table(V-table contains addrress of all
the virtual functions of class).So if we declare constructor
as virtual the who will intialize V-table for this constructor.

Destructor can not be overloaded simply becoz we cant
provide argument to a destructor and also its going to
release the memory when an object goes out of scope.

Is This Answer Correct ?    20 Yes 0 No

why constructor cannt be declar virtually? why destructor cannt be overloaded?..

Answer / saurabh

destructors ae not overloaded as its mere function is to
release memory ,and the objects which are going to die
soon...and u r looking for other ways to kill those objects.

Is This Answer Correct ?    1 Yes 8 No

Post New Answer

More OOPS Interview Questions

features of OOPS

22 Answers   Ness Technologies, Satyam,


what is the difference between a package and a software?

3 Answers  


What is data binding in oops?

0 Answers  


What normal C constructs work differently in C++?

2 Answers  


Describe these concepts: Polymorphism, Inheritance and Abstraction.

0 Answers   TCS,






Why do we use class in oops?

0 Answers  


How do you explain polymorphism?

0 Answers  


write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.

0 Answers   Microsoft, TCS,


what is the main difference between sizeof() operator in c and c++

3 Answers  


What is encapsulation process?

0 Answers  


1. Define a class.

6 Answers  


what is the new version of oops

0 Answers   Ignou,


Categories