Compute the long integer quotient and remainder.
Compatibility:This function is compatible with the following targets:
|
|
#include <stdlib.h>
ldiv_t ldiv(long int numer, long int denom);Parameters:
Parameters for this facility are:
The ldiv_t type is defined in stdlib.h as
typedef struct {
   long int quot, rem;
} ldiv_t;
ldiv() divides denom into numer and returns the quotient and remainder as an ldiv_t type.
Refer to "Example of div() usage." .