+ 4
(int)-4294967295 == 1, How?
#include <iostream> using namespace std; int main() { cout << (int)4294967295 << endl; cout << (int)-4294967295 << endl; return 0; } /* Output: -1 1 How (int)-4294967295 is equal to 1 and (int)4294967295 is equal to -1 */
1 Resposta
+ 3
ChillPill 4294967295 == - 1.
So it means -4294967295 == 1 is because the signs get multiplied (- * -1) and it becomes 1, is that right?