div

Returns the quotient and the remainder after the division of its arguments.

Format

#include  <stdlib.h>

div_t div  (int numer, int denom);

Arguments

numer
A numerator of type int.
denom
A denominator of type int.

Description

The type div_t is defined in the standard header file <stdlib.h> as follows:
typedef struct
        {
             int   quot, rem;
        } div_t;


Previous Page | Next Page | Table of Contents | Index