1div_t(3type)                                                      div_t(3type)
2
3
4

NAME

6       div_t,  ldiv_t, lldiv_t, imaxdiv_t - quotient and remainder of an inte‐
7       ger division
8

LIBRARY

10       Standard C library (libc)
11

SYNOPSIS

13       #include <stdlib.h>
14
15       typedef struct {
16           int quot; /* Quotient */
17           int rem;  /* Remainder */
18       } div_t;
19
20       typedef struct {
21           long quot; /* Quotient */
22           long rem;  /* Remainder */
23       } ldiv_t;
24
25       typedef struct {
26           long long quot; /* Quotient */
27           long long rem;  /* Remainder */
28       } lldiv_t;
29
30       #include <inttypes.h>
31
32       typedef struct {
33           intmax_t quot; /* Quotient */
34           intmax_t rem;  /* Remainder */
35       } imaxdiv_t;
36

DESCRIPTION

38       [[l]l]div_t is the type of the value returned by the [[l]l]div(3) func‐
39       tion.
40
41       imaxdiv_t is the type of the value returned by the imaxdiv(3) function.
42

STANDARDS

44       C11, POSIX.1-2008.
45

HISTORY

47       C99, POSIX.1-2001.
48

SEE ALSO

50       div(3), imaxdiv(3), ldiv(3), lldiv(3)
51
52
53
54Linux man-pages 6.05              2023-03-30                      div_t(3type)
Impressum