GeekInterview.com
Series: Subject: Topic:
Question: 2 of 85

what are the types of polymorphism ?

Asked by: rekhaty | Member Since May-2012 | Asked on: May 25th, 2012

View all questions by rekhaty

Showing Answers 1 - 5 of 5 Answers
Sunil Kumar

Answered On : May 25th, 2012

Two types of Polymorphisms
1. Static Polymorphism
2. Dynamic Polymorphism

  
Login to rate this answer.
yogita

Answered On : Jun 6th, 2012

There are two types of polymorphism:
1.Static polymorphism
2.dynamic polymorphism

Static polymorphism is decided at compile time,it can achieve by overloading.

Dynamic polymorphism is achieved by overriding and inheritance,it is decided at run time.

Yes  1 User has rated as useful.
  
Login to rate this answer.
sahanagk

Answered On : Jun 18th, 2012

View all answers by sahanagk

Static polymorphism: Its is decided at compile time, and is used to save the time by collecting all the methods with same name and different types, number of arguments .It is achieved by using "Overloading" methods technique.

Dynamic Polymorphism: Its decided run time ,its achieved by overriding the existing methods of base classes in derived class to enhance the feature. so that we can declare a method in base class and can be implement or enhance it using the same method by using "Overriding" concept.

  
Login to rate this answer.
naresh

Answered On : Aug 27th, 2012

There are two types of polymorphism
1. Dynamic polymorphism
2. Static polymorphism

The polymorphism that can be occur at run time is called dynamic polymorphism. This means that when we call the method the method call goes to the method at the time of running the program.

For static similar to dynamic but in place of run time, compile time it has happened.

  
Login to rate this answer.
Sirsat Manisha

Answered On : Oct 31st, 2012

There are two types of polymorphism. 1. compile time polymorphism 2. Run time polymorphism Compile time polymorphism is also called as "Static polymorphism" or it is referred as "Early binding" Compile time polymorphism occurs at the time of compilation Run time polymorphism is referred as"Late binding"or known as "Dynamic binding" It occurs at the run time Following is an example of compile time polymorphism:

Code
  1. #include<iostream.h>
  2. #include<conio.h>
  3. void main()
  4. {
  5. int a;
  6. a=20;
  7. cout<<a;
  8. getch();
  9. }

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.