stdlib.h Types and Macros

The following types are included in stdlib.h:

The following macros are included in stdlib.h:

div_t

A type that holds a quotient and remainder of a signed integer division with operands of type int.

Prototype

typedef struct { int quot, rem; } div_t;

Remarks

This is the structure type returned by the function, div.

ldiv_t

A type that holds a quotient and remainder of a signed integer division with operands of type long.

Prototype

typedef struct { long quot, rem; } ldiv_t;

Remarks

This is the structure type returned by the function, ldiv.

wchar_t

A type that holds a wide character value. In stdlib.h and stddef.h.

EXIT_FAILURE

Reports unsuccessful termination.

Remarks

EXIT_FAILURE is a value for the exit function to return an unsuccessful termination status.

Example

See exit for example of use.

EXIT_SUCCESS

Reports successful termination.

Remarks

EXIT_SUCCESS is a value for the exit function to return a successful termination status.

Example

See exit for example of use.

MB_CUR_MAX

Maximum number of characters in a multibyte character.

Value

1

RAND_MAX

Maximum value capable of being returned by the rand function.

Value

32767