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

Write a syntax and purpose of switch statement.

0 Answers   Agilent,


What is an abstract class in C++

0 Answers   SwanSoft Technologies,


What is conversion constructor in C++

0 Answers   TCS,


How does free know the size of memory to be deleted

0 Answers  


What is data abstraction? How is it implemented in C++?

0 Answers   Amdocs,


Mention the default functions in C++, how would you detect that error has occurred inside the constructor and destructor.

0 Answers   Adobe,


What is a virtual base class?

6 Answers   Fidelity, Siemens,


What are Agilent PRECOMPILERS?

0 Answers   Agilent,


Describe the different styles of function prototypes in C++.

0 Answers   Adobe,


What is a virtual function in C++?

0 Answers   C DAC,


Write a program that ask for user input from 5 to 9 then calculate the average

0 Answers   IBS,


Explain function prototypes in C++.

0 Answers   Aricent,


Categories