Question
1.
#include
2.
#include
3.
using namespace std;
4.
int main ()
5.
{
6.
int * a;
7.
int b;
8.
a = 0; b = 0;
9.
if (typeid(a) != typeid(b))
10.
{
11.
cout
What is the output of this program?
1.
#include
2.
#include
3.
using namespace std;
4.
int main ()
5.
{
6.
int * a;
7.
int b;
8.
a = 0; b = 0;
9.
if (typeid(a) != typeid(b))
10.
{
11.
cout
Answer: Option C
Was this answer helpful ?
In this program, We are finding the typeid of the given variables.
Output:
$ g++ rtti1.cpp
$ a.out
Pii
Was this answer helpful ?
More Questions on This Topic :
Question 1.
Which operators are part of RTTI?
....
Question 3.
To which type of class, We can apply RTTI?
....
Question 4.
What is the Run-Time Type Information?
....
Submit Solution