Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Can we call a virtual function from a constructor?



Can we call a virtual function from a constructor?..

Answer / hrpynux@gmail.com

You can call a virtual function in a constructor, but be careful. ... In a constructor, the virtual call mechanism is disabled because overriding from derived classes hasn't yet happened. Objects are constructed from the base up, “base before derived”.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ Interview Questions

Can we call C++ OOPS? and Why

0 Answers  


What is a virtual function in C++?

0 Answers   C DAC,


How does stack look in function calls? When does stack overflow? What can you do to remedy it?

0 Answers   Adobe,


Is there a difference between class and struct?

0 Answers  


What is the difference between member functions and static member functions?

0 Answers   Alter,


What is the difference between virtual functions and pure virtual functions?

1 Answers  


Write a C++ Program to find Square Root of a number using sqrt() function.

1 Answers  


Write a C++ Program to Find whether given Number is Odd or Even.

1 Answers  


What does it mean to declare a member function as static in C++?

0 Answers   Amazon,


What is the purpose of a constructor? Destructor?

0 Answers   Amazon,


dynamic scoping is

0 Answers   Siemens,


When must you use a constructor initializer list?

0 Answers   Amazon,


Categories