What is polymorphism? Explain with an example.

Answer Posted / vivek

Ploymorphism is the concept of OOP's. It allows you invoke
derived class methods through base class reference during
runtime.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you achieve runtime polymorphism?

573


What are the advantages of polymorphism?

577


What are the important components of cohesion?

557


What is object in oops?

615


Why is oop better than procedural?

606






Give two or more real cenario of virtual function and vertual object

1855


class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash

1701


What is the diamond problem in inheritance?

579


Why multiple inheritance is not allowed?

586


What is class and object in oops?

613


What is the real life example of polymorphism?

609


Why is destructor used?

585


Why is static class not inherited?

601


What is oops and why we use oops?

573


What is a null tree?

632