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

Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.

0 Answers  


How can i write a code in c# to take a number from the user and then find all the prime numbers till the number entered by the user.

4 Answers   NIIT, TCS,


What is a friend function & its advantage?

1 Answers   MIT,


what is diff between .net 1.1 and .net 2.0

4 Answers  


what is difference between class template and template class?

0 Answers  






What are properties in oop?

0 Answers  


Is oop better than procedural?

0 Answers  


the difference between new and malloc

5 Answers   Siemens,


What is multilevel inheritance in oop?

0 Answers  


What do we mean by a hidden argument in a function?

1 Answers   TCL,


how to tackle technical questions

1 Answers  


Is html an oop?

0 Answers  


Categories