While Simon is entirely right there is also
ldiv_t ldiv ( long int numerator, long int denominator );
Which returns the integral quotient and remainder of the division of numerator by denominator as a structure of type
ldiv_t
, this structure has two members quot and rem. If you need both results calling ldiv is more efficient.
Best regards
Espen Harlinn