-
What is the output of this program?
#include <iostream>
#include <typeinfo>
using namespace std;
class N
{
};
int main()
{
char ch; float n;
if (typeid(ch) != typeid(n))
cout << typeid(ch).name() << endl;
cout << typeid(N).name();
return 0;
}
-
- c
1N - Compilation Error
- n
- 1c
N - None of these
- c
Correct Option: A
We are checking the type id of char and float as they are not equal, We are printing c and 1N.