This header defines several general purpose functions, including dynamic memory management, random number generation, communication with the environment, integer arthmetics, searching, sorting and converting.
Functions
String conversion:
| atof | Convert string to double (function) |
| atoi | Convert string to integer (function) |
| atol | Convert string to long integer (function) |
| strtod | Convert string to double (function) |
| strtol | Convert string to long integer (function) |
| strtoul | Convert string to unsigned long integer (function) |
Pseudo-random sequence generation:
| rand | Generate random number (function) |
| srand | Initialize random number generator (functions) |
Dynamic memory management:
| calloc | Allocate space for array in memory (function) |
| free | Deallocate space in memory (function) |
| malloc | Allocate memory block (function) |
| realloc | Reallocate memory block (function) |
Environment:
| abort | Abort current process (function) |
| atexit | Set function to be executed on exit (function) |
| exit | Terminate calling process (function) |
| getenv | Get environment string (function) |
| system | Execute system command (function) |
Searching and sorting:
| bsearch | Binary search in array (function) |
| qsort | Sort elements of array (function) |
Integer arithmethics:
| abs | Absolute value (function) |
| div | Integral division (function) |
| labs | Absolute value (function) |
| ldiv | Integral division (function) |
Multibyte characters:
| mblen | Get length of multibyte character (function) |
| mbtowc | Convert multibyte character to wide character (function) |
| wctomb | Convert wide character to multibyte character (function) |
Multibyte strings:
| mbstowcs | Convert multibyte string to wide-character string (function) |
| wcstombs | Convert wide-character string to multibyte string (function) |
Macros
| MB_CUR_MAX | Maximum size of multibyte characters (macro) |
| NULL | Null pointer (macro) |
| RAND_MAX | Maximum value returned by rand (macro) |
Types
| div_t | Structure returned by div (type) |
| ldiv_t | Structure returned by div and ldiv (type) |
| size_t | Unsigned integral type (type) |