return quotient and remainder from division

You're viewing an older version of this page (#3241). View the current version.

View versions (3)

NAME

<span class="Nm" id="div">div</span>

INTERFACE

#include <stdlib.h> div_t div ( int num, int denom )

DESCRIPTION

The div function computes the value &#92;c num/denom and returns the quotient and remainder in a structure named &#92;c div_t that contains two <span class="Vt">int</span> members named <span class="Va">quot</span> and <span class="Va">rem</span>.

SEE ALSO

reference:imaxdiv (3) , ldiv (3) , reference:lldiv (3)

STANDARDS

The div function conforms to