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;..."

Follow CodeGalaxy

Mobile Beta

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