What is polymorphism ? Explain with examples
Answer Posted / k.r.sukumar
Polymorphism means "A single function which is used for
different purposes depending upon the parameters passed"
for eg;
Area is the function name which is used for
calculating areas of the rectangle, triangle and even more.
from this persepective we conclude that area is the single
function which is used for calculating different ones.
area(a);---> Area of the square
area(l,b);---> Area of the rectangle.
Is This Answer Correct ? | 22 Yes | 1 No |
Post New Answer View All Answers
What does no cap mean?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
Which type does string inherit from?
What does and I oop and sksksk mean?
What are the important components of cohesion?
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
What is the main purpose of inheritance law?
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?
What exactly is polymorphism?
What is abstraction in oops with example?
Explain the advantages of inheritance.
when to use 'mutable' keyword and when to use 'const cast' in c++
write knight tour problem which is present in datastructure
Why is polymorphism important in oop?
what's the basic's in dot net