What will be the output of the following code?

#include <iostream>
using namespace std;

class Zero{};

class One: public Zero{};
class Two: public Zero{};

int main()
    One* pO = new One;
    Two* pT = new Two;

    cout << (typeid(pO) == typeid(pT)) << endl;
    return 0;

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Sign Up Now
or Subscribe for future quizzes