0

What will the following line of code print and why?

#include <iostream> int main(int argc, char **argv) { std::cout << 25u - 50; return 0; }

27th Jun 2018, 11:33 AM
SOUMITRA MANDAL
SOUMITRA MANDAL - avatar
1 Resposta
+ 2
The output is 4294967271, as 25u forces the output to be unsigned, and -25 underflows to 4294867271.
27th Jun 2018, 11:58 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar