Why unsigned int 0xFFFFFFFF is equal to int -1?
C and C++ can run on many different architectures, and machine types. Consequently, they can have different representations of numbers: Two’s complement, and Ones’ complement being the most common. In general you should not rely on a particular representation in your program. For unsigned integer types (size_t being one of those), the C standard (and the … Read more