A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-63.c
1#include<stdio.h>
2intmain(void){
3inta=-2;
4unsignedb=4;
5printf("%u\n",a*b);
6return0;
7}
Numbers
Answer & explanation
Console output
4294967288
Why
Because b is unsigned, a is converted to unsigned: -2 becomes 4294967294. Multiplying by 4 gives 17179869176, which wraps modulo 2^32 to 4294967288. All of this is well-defined unsigned (modular) arithmetic; the negative result you might expect (-8) only appears if you reinterpret those bits as signed.