Everything
7.4.12 <stdlib.h>

Defines standard functions for standard processing of C programs.
The following macros are implementation-defined.

Type

Definition Name

Description

Type (macro)

onexit_t

Indicates the type returned by the function registered by the onexit function and the type of the value returned by the onexit function.

div_t

Indicates the type of structure of the value returned by the div function.

ldiv_t

Indicates the type of structure of the value returned by the ldiv function.

lldiv_t

Indicates the type of structure of the value returned by the lldiv function.

Constant (macro)

RAND_MAX

Indicates the maximum value of pseudo-random integers generated by the rand function.

EXIT_SUCCESS

Indicates the successfully completed state.

Function

atof

Converts a number-representing string to a double type floating-point number.

atoi

Converts a decimal-representing string to an int type integer.

atol

Converts a decimal-representing string to a long type integer.

atoll

Converts a decimal-representing string to a long long type integer.

strtod

Converts a number-representing string to a double type floating-point number.

strtof

Converts a number-representing string to a float type floating-point number.

strtold

Converts a number-representing string to a long double type floating-point number.

strtol

Converts a number-representing string to a long type integer.

strtoul

Converts a number-representing string to an unsigned long type integer.

strtoll

Converts a number-representing string to a long long type integer.

strtoull

Converts a number-representing string to an unsigned long long type integer.

rand

Generates pseudo-random integers from 0 to RAND_MAX.

srand

Sets an initial value of the pseudo-random number sequence generated by the rand function.

calloc

Allocates a storage area and clears all bits in the allocated storage area to 0.

free

Releases specified storage area.

malloc

Allocates a storage area.

realloc

Changes the size of storage area to a specified value.

bsearch

Performs binary search.

qsort

Performs sorting.

abs

Calculates the absolute value of an int type integer.

Function

div

Carries out division of int type integers and obtains the quotient and remainder.

labs

Calculates the absolute value of a long type integer.

ldiv

Carries out division of long type integers and obtains the quotient and remainder.

llabs

Calculates the absolute value of a long long type integer.

lldiv

Carries out division of long long type integers and obtains the quotient and remainder.

 

Implementation-Defined Specifications

Item

Compiler Specifications

calloc, malloc, or realloc function operation when the size is 0.

NULL is returned.