You are taking quiz After 0 of 10 questions, you have 0.00 points.

Question #286 Difficulty: 2

According to the C++17 standard, what is the output of this program?


int main()
    unsigned short x=0xFFFF;
    unsigned short y=0xFFFF;
    auto z=x*y;
    std::cout << (z > 0);


x and y both go through integer promotions before being multiplied, resulting in another type than short.


Mode : Quiz

If you want to quit the current quiz and go back to training mode, click here.