Div function – Zilog Z80380 User Manual
Page 71

UM004001-COR1103
4–7
Run Time Environment
Library Functions
div
FUNCTION
Header file statement:
#include
Syntax:
div_t div( int num, int denom);
The
div
function divides numer by denom, computing the quotient and the remainder. The
div_t structure contains the following elements:
The sign of the quotient is the same as that of the mathematical quotient. Its absolute value is
the largest integer that is less than the absolute value of the mathematical quotient. If the
denominator is 0, the behavior is undefined.
Return Value
The div function returns a structure of type div_t, comprising both the quotient and the
remainder. The structure is defined in the stdlib.h header file.
is
FUNCTIONS
Header file statement:
#include
Syntax:
int isalnum
( int c );
int isalpha
( int c );
int iscntrl
( int c );
int isdigit
( int c );
int isgraph
( int c );
int islower
( int c );
int isprint
( int c );
int ispunct
( int c );
Parameter
Description
numer
Numerator
denom
Denominator
Element
Description
int quot
Quotient
int rem
Remainder