The
div() function computes the value
numerator/denominator and
returns the quotient and remainder in a structure
named div_t that contains
two integer members (in unspecified order) named quot and rem.
The quotient is rounded toward zero.
The result satisfies quot*denominator+rem = numerator.

The
ldiv(),
lldiv(), and
imaxdiv() functions do the same,
dividing numbers of the indicated type and
returning the result in a structure
of the indicated name, in all cases with fields quot and rem
of the same type as the function arguments.

This page is part of release 3.44 of the Linux
man-pages project.
A description of the project,
and information about reporting bugs,
can be found at
http://www.kernel.org/doc/man-pages/.