signed long long value = -2147483648;
cout << ((signed long long)value);
outputs 2147483648 (no minus sign), why?
signed long long value = -2147483648;
2147483648
cannot be represented in a 32-bit signed integer, so it is converted to an unsigned, then unary minus is applied (which doesn't change anything), and then it is assigned to the signed long long. Use -2147483648LL