ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  C++ General
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
What are the different types of polymorphism?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What are the different types of polymorphism?
Answer
# 1
compile time--->operator and function overlaoding
run time --->virtual
 
Is This Answer Correct ?    2 Yes 0 No
Dee
 
  Re: What are the different types of polymorphism?
Answer
# 2
There are two types of polymorphism.
1. Adhoc polymorphism (Overloading, templates).
2. Parametric polymorphism(Overriding).

If the behaviors are finite and known before its usage, it 
is adhoc polymorphism. These bindings are done at 
compilation itself and hence called compile time binding.

If the behaviors are infinite and known only at run time at 
the time of use, it is parametric polymorphism. These 
binding can be mapped at run time only and hence sometimes 
referred as run time binding.

Note:- Virtual mechanism is used to resolve conflicts in 
overriding polymorphically. Virtual mechanism itself 
doesn't provide any polymorphism rather the overriding 
leads to run time polymorphism.
 
Is This Answer Correct ?    0 Yes 3 No
Mms Zubeir
 
 
 

 
 
 
Other C++ General Interview Questions
 
  Question Asked @ Answers
 
What is Memory Alignment? TCS1
What is virtual constructor paradigm? HP3
How do you link a C++ program to C functions?  2
What does '\r' and '\b' mean? Please explain with example.  3
Definition of class?  10
How do you test your code? Microsoft3
write the prime no program in c++?  5
How to write Multithreaded applications using C++? Honeywell2
How to avoid a class from instantiation? Symphony5
difference between c and c++? Infosys8
How do I open binary files?  1
How to write a program such that it will delete itself after exectution?  1
class X { public: int x; static void f(int z); }; void X::f(int y) {x=y;} What is the error in the sample code above? a) The class X does not have any protected members. b) The static member function f() accesses the non-static z. c) The static member function f() accesses the non-static x. d) The member function f() must return a value. e) The class X does not have any private members. Quark2
What is a pure virtual function? Why is it represented as = 0...how is the internal implementation for the same CTS3
Why would you make a destructor virtual? Lehman-Brothers3
What is the use of static functions? Symphony6
When copy constructor can be used? Symphony4
Explain working of printf?  3
What is the output of printf("%d")? HCL25
Consider a c++ template funtion template<class T> T& Add(T a, T b){return a+b ;} if this function is called as T c = Add("SAM", "SUNG"); what will happen? What is the problem in the template declaration/ How to solve the problem. Samsung4
 
For more C++ General Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com