atoi() — Convert character string to integer
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
ISO C |
both |
Format
#include <stdlib.h>
int atoi(const char *nptr);
General description
The
atoi() function converts the initial portion of the string pointed
to by nptr to a 'int'. This is equivalent
to
(int)strtol(nptr, NULL, 10)
Returned value
There are no documented errno values.