Biology, asked by Abhiroop12, 6 months ago

Explain polymorphism.​

Answers

Answered by Anonymous
3

Answer:

The word polymorphism means having many forms. Typically, polymorphism occurs when there is a hierarchy of classes and they are related by inheritance. C++ polymorphism means that a call to a member function will cause a different function to be executed depending on the type of object that invokes the function.

Explanation:

hope this helps you ❤❤

Answered by kush193874
3

Explanation:

Compile time Polymorphism

Run time Polymorphism

In Compile time Polymorphism, call is resolved by the compiler.In Run time Polymorphism, call is not resolved by the compiler.It is also known as Static binding, Early binding and overloading as well.It is also known as Dynamic binding, Late binding and overriding as well.Overloading is compile time polymorphism where more than one methods share the same name with different parameters or signature and different return type.Overriding is run time polymorphism having same method with same parameters or signature, but associated in a class & its subclass.It is achieved by function overloading and operatoroverloading.It is achieved by virtual functions and pointers.It provides fast execution because known early at compile time.It provides slow execution as compare to early binding because it is known at runtime.Compile time polymorphism is less flexible as all things execute at compile time.Run time polymorphism is more flexible as all things execute at run time.

Similar questions