CARVIEW |
Select Language
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Sat, 19 Jul 2025 17:32:31 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Location: /reference/cstdlib/
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 19 Jul 2025 17:32:31 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
ETag: W/"941c-jdVzM0eXcU3Dw39+CDF/SXH2IgI"
Content-Encoding: gzip
This header defines several general purpose functions, including dynamic memory management, random number generation, communication with the environment, integer arithmetics, searching, sorting and converting.
Reference
C library:
- <cassert> (assert.h)
- <cctype> (ctype.h)
- <cerrno> (errno.h)
-
<cfenv> (fenv.h)C++11
- <cfloat> (float.h)
-
<cinttypes> (inttypes.h)C++11
- <ciso646> (iso646.h)
- <climits> (limits.h)
- <clocale> (locale.h)
- <cmath> (math.h)
- <csetjmp> (setjmp.h)
- <csignal> (signal.h)
- <cstdarg> (stdarg.h)
-
<cstdbool> (stdbool.h)C++11
- <cstddef> (stddef.h)
-
<cstdint> (stdint.h)C++11
- <cstdio> (stdio.h)
- <cstdlib> (stdlib.h)
- <cstring> (string.h)
-
<ctgmath> (tgmath.h)C++11
- <ctime> (time.h)
-
<cuchar> (uchar.h)C++11
- <cwchar> (wchar.h)
- <cwctype> (wctype.h)
Containers:
-
<array>C++11
- <deque>
-
<forward_list>C++11
- <list>
- <map>
- <queue>
- <set>
- <stack>
-
<unordered_map>C++11
-
<unordered_set>C++11
- <vector>
-
Input/Output:
Multi-threading:
-
<atomic>C++11
-
<condition_variable>C++11
-
<future>C++11
-
<mutex>C++11
-
<thread>C++11
-
Other:
- <algorithm>
- <bitset>
-
<chrono>C++11
-
<codecvt>C++11
- <complex>
- <exception>
- <functional>
-
<initializer_list>C++11
- <iterator>
- <limits>
- <locale>
- <memory>
- <new>
- <numeric>
-
<random>C++11
-
<ratio>C++11
-
<regex>C++11
- <stdexcept>
- <string>
-
<system_error>C++11
-
<tuple>C++11
-
<type_traits>C++11
-
<typeindex>C++11
- <typeinfo>
- <utility>
- <valarray>
<cstdlib> (stdlib.h)
functions
-
_ExitC++11
- abort
- abs
-
at_quick_exitC++11
- atexit
- atof
- atoi
- atol
-
atollC++11
- bsearch
- calloc
- div
- exit
- free
- getenv
- labs
- ldiv
-
llabsC++11
-
lldivC++11
- malloc
- mblen
- mbstowcs
- mbtowc
- qsort
-
quick_exitC++11
- rand
- realloc
- srand
- strtod
-
strtofC++11
- strtol
-
strtoldC++11
-
strtollC++11
- strtoul
-
strtoullC++11
- system
- wcstombs
- wctomb
-
functions (non-standard)
types
macro constants
- Reference
- <cstdlib>
header
<cstdlib> (stdlib.h)
C Standard General Utilities Library
Functions
String conversion
- atof
- Convert string to double (function)
- atoi
- Convert string to integer (function)
- atol
- Convert string to long integer (function)
- atoll
- Convert string to long long integer (function)
- strtod
- Convert string to double (function)
- strtof
- Convert string to float (function)
- strtol
- Convert string to long integer (function)
- strtold
- Convert string to long double (function)
- strtoll
- Convert string to long long integer (function)
- strtoul
- Convert string to unsigned long integer (function)
- strtoull
- Convert string to unsigned long long integer (function)
Pseudo-random sequence generation
- rand
- Generate random number (function)
- srand
- Initialize random number generator (function)
Dynamic memory management
- calloc
- Allocate and zero-initialize array (function)
- free
- Deallocate memory block (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)
- at_quick_exit
- Set function to be executed on quick exit (function)
- exit
- Terminate calling process (function)
- getenv
- Get environment string (function)
- quick_exit
- Terminate calling process quick (function)
- system
- Execute system command (function)
- _Exit
- Terminate calling process (function)
Searching and sorting
- bsearch
- Binary search in array (function)
- qsort
- Sort elements of array (function)
Integer arithmetics
- abs
- Absolute value (function)
- div
- Integral division (function)
- labs
- Absolute value (function)
- ldiv
- Integral division (function)
- llabs
- Absolute value (function)
- lldiv
- Integral division (function)
Multibyte characters
- mblen
- Get length of multibyte character (function)
- mbtowc
- Convert multibyte sequence to wide character (function)
- wctomb
- Convert wide character to multibyte sequence (function)
Multibyte strings
- mbstowcs
- Convert multibyte string to wide-character string (function)
- wcstombs
- Convert wide-character string to multibyte string (function)
Macro constants
- EXIT_FAILURE
- Failure termination code (macro)
- EXIT_SUCCESS
- Success termination code (macro)
- 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 ldiv (type)
- lldiv_t
- Structure returned by lldiv (type)
- size_t
- Unsigned integral type (type)
Home page | Privacy policy
© cplusplus.com, 2000-2025 - All rights reserved - v3.3.4s
Spotted an error? contact us
© cplusplus.com, 2000-2025 - All rights reserved - v3.3.4s
Spotted an error? contact us