SYNOPSIS
#include <stdlib.h>
div_t div(int numer, int denom);
ldiv_t div(long numer, long denom);
lldiv_t div(long long numer, long long denom);
#include <inttypes.h>
imaxdiv_t div(intmax_t numer, intmax_t denom);
DESCRIPTION
The
The div_t type is defined as: typedef struct { int quot; /* Quotient. */ int rem; /* Remainder. */ } div_t;
The ldiv_t type is defined as: typedef struct { long quot; /* Quotient. */ long rem; /* Remainder. */ } ldiv_t;
The lldiv_t type is defined as: typedef struct { long long quot; /* Quotient. */ long long rem; /* Remainder. */ } lldiv_t;
The imaxdiv_t type is defined as: typedef struct { intmax_t quot; /* Quotient. */ intmax_t rem; /* Remainder. */ } imaxdiv_t;
PARAMETERS
RETURN VALUES
The
int quot; /* quotient */ int rem; /* remainder */
CONFORMANCE
ANSI/ISO 9899-1990.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
None.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.5 Documentation Build 40.