lldiv() — Compute quotient and remainder of integral division for long long type

Format

#include <stdlib.h>

lldiv_t lldiv (long long number, long long denom);
Compile Requirement: Use of this function requires the long long data type. See z/OS XL C/C++ Language Reference for information about how to make long long available.

General description

The lldiv() function calculates the quotient and remainder of the division of numerator by denominator.

Returned value

The lldiv() function returns a structure of type lldiv_t, containing both the quotient long long quot and the remainder long long rem.

If the value cannot be represented, the returned value is undefined. If denominator is 0, a divide by 0 exception is raised.

Related Information