 |
stdlib.h |
Header File |
Some useful routines proposed by ANSI (sorting, searching, etc.)
Functions
- abort
- Abnormal termination of a process.
![]()
- abs
- Absolute value of a number.
![]()
- alloca
- Allocates memory on the local storage space.
![]()
- atexit
- Registers a termination function.
![]()
- atof
- Converts a string to a floating point.
![]()
- atoi
- Converts a string to a short integer.
![]()
- atol
- Converts a string to a long integer.
![]()
- bsearch
- Binary search.
![]()
- calloc
- Allocates a memory block for a given number and size of items.
![]()
- div
- Divides two short integers, and returns quotient and remainder.
![]()
- exit
- Forced termination of the program.
![]()
- fabs
- Absolute value of a floating point number.
![]()
- free
- Frees an allocated block.
![]()
- labs
- Absolute value of a long integer number.
![]()
- ldiv
- Divides two long integers, and returns quotient and remainder.
![]()
- malloc
- Allocates a memory block.
![]()
- max
- Maximum of two integer numbers.
![]()
- min
- Minimum of two integer values.
![]()
- qsort
- Sorts an area of items.
![]()
- rand
- Returns a pseudorandom number.
![]()
- random
- Generates a random integer in a given range.
![]()
- randomize
- Initializes random number generator with a random value.
![]()
- realloc
- Reallocates allocated memory.
![]()
- srand
- Initializes random number generator.
![]()
- strtol
- Converts a string to a long integer using a given radix, with detection of overflows and errors.
![]()
- strtoul
- Converts a string to an unsigned long integer using a given radix, with detection of overflows and errors.
Constants
- NULL
- A null-pointer value.
![]()
- RAND_MAX
- Returns the largest number returned by rand.
Predefined Types
- atexit_t
- Describes an exit function passed to atexit.
![]()
- compare_t
- Describes a comparison function.
![]()
- div_t
- An integer division return type used in the div function.
![]()
- ldiv_t
- A long integer division return type used in the ldiv function.
![]()
- size_t
- A type to define sizes of strings and memory blocks.