Home » C++ Programming » Questions and Answers » Question
  1. What is the output of this program?
    #include <iostream>
    #include <typeinfo>
    using namespace std;
    int main ()
    {
    int * num1;
    int num2;
    num1 = 0; num2 = 3;
    if (typeid(num1) != typeid(num2))
    {
    cout << typeid(num1).name() << " ";
    cout << typeid(num2).name();
    }
    return 0;
    }
    1. i iP
    2. iP i
    3. Pi i
    4. All of above
    5. None of these
Correct Option: C

In this program, We are finding the typeid of the given variables.



Your comments will be displayed only after manual approval.