What will be printed out as a result of the following code execution?
#include <iostream>
using namespace  std;

int main(int argc, char *argv[])
{
    int d = 3 / 0; 
    cout << d;
    return 0;
}
Explanation
According to section 5.6 of a С++ standard: "ISO/IEC 14882:1998(E) 5.6 Multiplicative operators
... If the second operand of / or % is 0, then the behavior is undefined;..."

Следи за CodeGalaxy

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

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