Respuesta :

tonb
The modf() function will do this for you:

double x, y, d;
x = -14.876;
y = modf(x, &d);
printf("Fractional part = %lf\n", y);