I have the following code in C
#include <stdio.h>
int main()
{
    float a = 1.88;
    a =a - (0.25 * 7 + 0.1 * 1);
    a = a *100;
    printf("a = %f\n",a );
    int b =(int) (a);
    printf("b = %d\n", b);
}
The value of b should be 2 but I get the following output-
a = 3.000000
b = 2
Why is it so?
 
    