Computes the long integer quotient and remainder.
#include <stdlib.h> ldiv_t ldiv(long int numer, long int denom);
numer
The numerator.
denom
The denominator.
The ldiv_t type is defined in div_t.h as typedef struct { long int quot, rem; } ldiv_t;
ldiv() divides denom into numer and returns the quotient and remainder as a ldiv_t type.
This facility is not specified in the ISO/IEC standards. It is an EWL extension of the standard libraries.