What is RTTI and why do you need it?



What is RTTI and why do you need it?..

Answer / Vivek Pandey

Run-Time Type Identification (RTTI) in C++ allows a program to query the type of an object at run time. It's useful when working with polymorphic objects, as it enables safe downcasting and dynamic_casting.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ Interview Questions

Write a C++ Program to Find whether given Number is Odd or Even.

1 Answers  


what is friend function in C++?

1 Answers   TCS,


Can we provide one default constructor for our class?

1 Answers  


There is a base class sub, with a member function fnsub(). There are two classes super1 and super2 which are sub classes of the base class sub.if and pointer object is created of the class sub which points to any of the two classes super1 and super2, if fnsub() is called which one will be inoked?

1 Answers   Alter,


How to run C++ program in cmd

1 Answers  


What does it mean to declare a member function as virtual in C++?

1 Answers   Amazon,


What is name mangling/name decoration?

1 Answers   Amazon,


What is conversion constructor in C++

1 Answers   TCS,


Define an Abstract class in C++?

1 Answers  


What are "pure virtual" functions?

1 Answers   Adobe, Alter, iNautix,


What is an algorithm (in terms of the STL/C++ standard library)?

1 Answers   Amazon,


What is the 4 difference between delete[] and delete?

1 Answers   Alter,


Categories