logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

div_t, ldiv_t, lldiv_t, imaxdiv_t - quotient and remainder of an integer division

Description

       [[l]l]div_t is the type of the value returned by the [[l]l]div(3) function.

       imaxdiv_t is the type of the value returned by the imaxdiv(3) function.

History

       C99, POSIX.1-2001.

Library

       Standard C library (libc)

Name

       div_t, ldiv_t, lldiv_t, imaxdiv_t - quotient and remainder of an integer division

See Also

div(3), imaxdiv(3), ldiv(3), lldiv(3)

Linux man-pages 6.9.1                              2024-05-02                                       div_t(3type)

Standards

       C11, POSIX.1-2008.

Synopsis

#include<stdlib.h>typedefstruct{intquot; /* Quotient */
           intrem;  /* Remainder */
       }div_t;typedefstruct{longquot; /* Quotient */
           longrem;  /* Remainder */
       }ldiv_t;typedefstruct{longlongquot; /* Quotient */
           longlongrem;  /* Remainder */
       }lldiv_t;#include<inttypes.h>typedefstruct{intmax_tquot; /* Quotient */
           intmax_trem;  /* Remainder */
       }imaxdiv_t;

See Also