Discussion
The following feature of C++ is an example of run time polymorphism
Answer: D
Run time polymorphism comes from a VIRTUAL FUNCTION.
When a base class declares a function virtual and a derived class overrides it, a call through a base-class pointer or reference is bound at run time, through the virtual table, to the version for the object's actual type. This dynamic binding is run time polymorphism.
Operator overloading and templates are resolved by the compiler, so they are compile time polymorphism. Pointers are a language feature that virtual calls use, not a form of polymorphism themselves.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development