What will be printed as a result of execution of this code:
class Obj
{
public:
    Obj()
    {
    try
    {
        checked = false;
        throw 1;
        value = 1;
    }
    catch(int a)
    {
        if( a == 1 )
        {
            cout << "Exception" << endl;
        }
        };
    }
    const int getValue() const { return value;}
private:
    int  value;
    bool checked;
};

int main()
{
    Obj* obj = new Obj;
    cout << obj->getValue();
}

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты