This code:
int main(){
printf("The value of FLT_MAX is %.5f\n", FLT_MAX);
printf("The value of FLT_MIN is %.5f\n", FLT_MIN);
printf("A float takes %i bytes\n", sizeof(float));
float fx = -1.24;
printf("The value of fx is %f\n", fx);
}
returns:
The value of FLT_MAX is 340282346638528859811704183484516925440.00000
The value of FLT_MIN is 0.00000
A float takes 4 bytes
The value of fx is -1.240000
Is float
unsigned or signed? Why is the FLT_MIN
0
but on the other hand I can store a negative value in a float
?