Question
1.
#include
2.
using namespace std;
3.
struct A
4.
{
5.
virtual void f()
6.
{
7.
cout
What is the output of this program?
1.
#include
2.
using namespace std;
3.
struct A
4.
{
5.
virtual void f()
6.
{
7.
cout
Answer: Option C
Was this answer helpful ?
In this program, We applied the dynamic casting to structure and produced the output.
Output:
$ g++ rtti4.cpp
$ a.out
Class C
Class A
Was this answer helpful ?
More Questions on This Topic :
Question 4.
Which operators are part of RTTI?
....
Question 6.
To which type of class, We can apply RTTI?
....
Question 7.
What is the Run-Time Type Information?
....
Submit Solution