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...

What are Virtual Functions? How to implement virtual
functions in "C" ?

Answer Posted / rama

When we use the same function name in both the base and the
derived classes, the function in base class is declared as virtual...we must access virtual function through the use of a pointer declared as a pointer to the base class..


In other words, virtual function is defined in the base class,it need not be necessarily redefined in the derived class. In such cases,the respective calls will invoke the base class function.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c++ an oop?

1088


What does #define mean in c++?

1266


What can I use instead of namespace std?

1146


Can we overload operator in c++?

1032


What is rvalue?

1132


What are the advantages of using typedef in a program?

1140


What is a container class?

1134


How to declare a pointer to an array of integers?

1137


What is constructor and destructor in c++?

1110


How does c++ sort work?

965


Write a program using display() function which takes two arguments.

1064


Which one between if-else and switch is more efficient?

1064


What do you understand by pure virtual function? Write about its use?

998


What is a forward referencing and when should it be used?

1162


Why c++ does not have finally?

1074