atoi(3) Library Functions Manual atoi(3) atoi, atol, atoll - (libc -lc) #include int atoi(const char *nptr); long atol(const char *nptr); long long atoll(const char *nptr); glibc ( feature_test_macros(7)): atoll(): _ISOC99_SOURCE || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE atoi() nptr int. strtol(nptr, NULL, 10); atoi() . atol() atoll() atoi() long long long. 0 . attributes(7). +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ | | | | +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ |atoi(), atol(), | | (locale) (MT-Safe) | |atoll() | | | +----------------------+------------------------------------+---------------------------------------------------------------------------------------------+ POSIX.1 atoi() . glibc musl libc uClibc 0 . C11, POSIX.1-2008. C99, POSIX.1-2001, SVr4, 4.3BSD. C89 POSIX.1-1996 atoi() atol() . errno 0 . . 10 . strtol() strtoul() . atof(3), strtod(3), strtol(3), strtoul(3) 3 . . : . 6.18 8 2026 atoi(3)