Implementation status: to be implemented

Synopsis

#include <stdlib.h>

div_t div(int numer, int denom);

Description

The function divides numer (numerator) by denom (denominator).

The returned structure includes the following members, in any order:

int quot; /* quotient */
int rem; /* remainder */

If the result cannot be represented, the behavior is undefined; otherwise, quot* denom+ rem equals numer.

Return value

The function returns a structure of type div_t, comprising both the quotient and the remainder.

Errors

No errors are defined.