1.

To which type of class, We can apply RTTI?(a) Encapsulation(b) Polymorphic(c) Derived(d) StaticI got this question in a job interview.Asked question is from Run Time Type Information in section Class Hierarchies, Library & Containers of C++

Answer»

The CORRECT choice is (b) POLYMORPHIC

The explanation: RTTI is AVAILABLE only for CLASSES which are polymorphic, which means they have at least one virtual method.



Discussion

No Comment Found

Related InterviewSolutions