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

What is the purpose of a constructor? Destructor?

0 Answers   Amazon,


Write a C++ Program to Display Number (Entered by the User).

1 Answers  


C++ supports multiple inheritance. What is the “diamond problem” that can occur with multiple inheritance? Give an example.

0 Answers  


Identify the error in the following program. #include<iostream.h> void main() { int i = 0; i = i + 1; cout « i « " "; /*comment *//i = i + 1; cout << i; }

1 Answers  


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

0 Answers   Alter,


What is the meaning of the following declaration: int *const *const *i?

0 Answers   Adobe,


Without using third variable write a code to swap two numbers.

0 Answers   Accenture,


Define type casting in C++.

0 Answers   Amdocs,


What is a constructor initializer list?

0 Answers   Amazon,


Write a program to display the following output using a single cout statement Maths=90 Physics=77 Chemistry = 69

2 Answers  


Write a program to generate the Fibonocci Series in C++.

0 Answers   Accenture,


How to run C++ program in cmd

0 Answers  


Categories