div is a function in C programming language that takes two integers as
parameters and returns the result of a division between them. It is specified in ANSI-C, and is included from the
stdlib.h header when used.
div has a prototype as follows:
div_t div (int numerator, int denominator)
The return value, div_t is a special datatype which is specifically used in
storing the results of this function. It is defined as follows:
typedef struct {
int quot;
int rem;
} div_t;
Where quot stores the quotient and rem stores the remainder.
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)





