What Is Polymorphism in C++ ?

Answer Posted / hrpynux@gmail.com

Polymorphism in C++ means, the same entity (function or object) behaves differently in different scenarios. Consider this example: The “ +” operator in c++ can perform two specific functions at two different scenarios i.e when the “+” operator is used in numbers, it performs addition.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a c++ map?

768


If you want to share several functions or variables in several files maitaining the consistency how would you share it?

650


Who invented turbo c++?

731


Consider the following C++ program

411


What is the protected keyword used for?

724






What is isdigit c++?

683


How do you write a function that can reverse a linked-list?

678


Comment on local and global scope of a variable.

671


Is it possible to provide special behavior for one instance of a template but not for other instances?

733


Why is it necessary to use a reference in the argument to the copy constructor?

717


What is meant by entry controlled loop?

738


Why isn't sizeof for a struct equal to the sum of sizeof of each member?

622


Why do we use pointers in c++?

679


When is dynamic checking necessary?

674


What are formatting flags in ios class?

699