Name

lldiv

Synopsis

Performs integer division, returning quotient and remainder

#include <stdlib.h>
lldiv_tlldiv( long long dividend, long long divisor );

The parameters of lldiv() are long long integers, and its return value is a structure of type lldiv_t containing two long long integers. Otherwise, lldiv() works the same as the int function div().

Example

See the example for div() in this chapter.

Get C in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.