try it out:
volatile float bob = -344.0f;
unsigned int fred = (unsigned int)bob;
printf(\"%d\\n\",fred);
output will be 0.
obvious
§6.3.1.4 of the C standard:
When a finite value of real floating type is converted to an integer type other than _Bool, the fractional part is discarded (i.e., the value is truncated toward zero). If the value of the integral part cannot be represented by the integer type, the behavior is undefined.
So like Paul R said, this is undefined behavior.