Before you go through this post go for the link to know about % operator.
-> As % operator cannot used with DOUBLE values, as it generates compile time error, there is a special function ” fmod( ) ” in c.
-> fmod( ) return type is double. So, we use %lf specifier when it is used .

Example programs to understand fmod() function :

1.500000


output: shows error like Illegal use of floating point.