OS Data Structures Question:
Download Questions PDF

What is difference between the run time polymorphism and compile time poly morphism and about virtual function?

Answer:

Compile time polymorphism(Static polymorphism) means
basically those language structure which will cause the
compiler to produce code at the compile-time. That is, the
compiler is well aware that what code is to be generated at
the compile-time itself: Ex: overloading of operators,
functions.

Run time Polymorphism(Dynamic Polymorphism)means that the
compiler is unaware what code is to be generated so it binds
the possible code and let the program decide it at the
run-time itself.Ex: the virtualness of a class member or the
entire class itself.

Download OS Data Structures Interview Questions And Answers PDF

Previous QuestionNext Question
Why enum can not be used directly with printf function?Explain real world example of polymorphism and encapsulation?