Previous Page
Next Page

ldiv

Performs integer division, returning quotient and remainder

#include <stdlib.h>
ldiv_t ldiv ( long dividend , long divisor  );

The parameters of ldiv( ) are long integers, and its return value is a structure of type ldiv_t containing two long integers. Otherwise, ldiv( ) works the same as the int function div( ).

Example

See the example for div( ) in this chapter.

See Also

div( ), lldiv( ), imaxdiv( )


Previous Page
Next Page