modfSeparates a floating point number into integer and fractional parts | |||||
Arguments
Return valueThe fractional part of x is returned.Explanationx is separated into an integer part and a fractional part. The integer part is placed at the storage location pointed to by y. The fractional part is returned by the function.NotesThe sign for both integer parts and fractional parts will be the same as the sign of x.Example#include <math.h>#include <stdio.h> void main(void)
Output: For -14.876543, the fraction is -0.876543 and the integer is -14 |