look at this code:
void main ()
{
int i = -1;
unsigned u = 1;
cout << u + i;
}
adding u (unsigned) and I (signature), so I have to convert to an unsigned type, so it should be interpreted ((2 ^ 32) - 1), and the expression should change: -1 + 1 to ((2 ^ 32 ) - 1) + 1, but when I run the code, it leads to 0 why?
MTVS source
share