ldiv_t
(3type)quotient and remainder of an integer division
#include <stdlib.h> typedef struct { int quot; /* Quotient */ int rem; /* Remainder */ } div_t; typedef struct { long quot; /* Quotient */ long rem; /* Remainder */ } ldiv_t; typedef struct { long long quot; /* Quotient */ long long rem; /* Remainder */ } lldiv_t; #include <inttypes.h> typedef struct { intmax_t quot; /* Quotient */ intmax_t rem; /* Remainder */ } imaxdiv_t;