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.
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.