delorie.com/djgpp/doc/libc/libc_533.html | search |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <stdlib.h> lldiv_t lldiv(long long int numerator, long long int denominator); |
Returns the quotient and remainder of the division numerator divided by denominator. The return type is as follows:
typedef struct { long long int quot; long long int rem; } lldiv_t; |
The results of the division are returned.
ANSI/ISO C | C99; not C89 |
POSIX | 1003.1-2001; not 1003.2-1992 |
lldiv_t l = lldiv(42, 3); printf("42 = %lld x 3 + %lld\n", l.quot, l.rem); lldiv(+40, +3) = { +13, +1 } lldiv(+40, -3) = { -13, +1 } lldiv(-40, +3) = { -13, -1 } lldiv(-40, -3) = { +13, -1 } |
webmaster | delorie software privacy |
Copyright © 2004 | Updated Apr 2004 |