The C <stdlib.h> header defines several general purpose functions which includes dynamic memory management, random number generation, communication with the environment, integer arithmetics, searching, sorting and converting.
Functions | Description |
atoi() |
Converts a byte string to an integer value. |
atol() |
Converts a byte string to a long integer value. |
atoll() |
Converts a byte string to a long long integer value. |
Functions | Description |
calloc() |
Allocate and zero-initialize array. |
free() |
Deallocates previously allocated memory. |
malloc() |
Allocates memory. |
realloc() |
Reallocates previously allocated memory block. |
Functions | Description |
rand() |
Returns a pseudo-random integral value between 0 and RAND_MAX. |
srand() |
Seeds the pseudo-random number generator used by rand() with the value seed. |
Functions | Description |
abs() |
Returns absolute value of an integral value. |
div() |
Returns quotient and remainder of integer division. |
labs() |
Returns absolute value of an integral value. |
ldiv() |
Returns quotient and remainder of integer division. |
llabs() |
Returns absolute value of an integral value. |
lldiv() |
Returns quotient and remainder of integer division. |
Macros | Description |
MB_CUR_MAX |
Maximum size of a multibyte characters with the current locale. |
NULL |
Null pointer. |
RAND_MAX |
Maximum value returned by rand() function. |