How do I multiply a float accurately?

(beginner here) I'm doing the CS50 course and in the cash problem I'm struggling with a simple multiplication. I have a float that I multiply by 100. And the test fails for the value 4.2 which gives 419 so the rest of the computation is wrong. So I tried this:

    #include <stdio.h>
#include <cs50.h>
#include <math.h>

int main(void)
    float c = get_float("Enter float: ");
    int x = ceilf(c * 100);
    printf("%i", x);

4.2 becomes 420, great! But 0.15 becomes 16

How do I solve this? And why is C so stupid :-)