C Language: Atoi Function (Convert String To Integer) - TechOnTheNet
Maybe your like
- Home
- C Language
- Standard Library Functions
- stdlib.h
C Language: atoi function(Convert String to Integer) In the C Programming Language, the atoi function converts a string to an integer.
The atoi function skips all white-space characters at the beginning of the string, converts the subsequent characters as part of the number, and then stops when it encounters the first character that isn't a number.
Syntax
The syntax for the atoi function in the C Language is:
int atoi(const char *nptr);Parameters or Arguments
nptr A pointer to a string to convert to an integer.Returns
The atoi function returns the integer representation of a string. The atoi function skips all white-space characters at the beginning of the string, converts the subsequent characters as part of the number, and then stops when it encounters the first character that isn't a number.
Required Header
In the C Language, the required header for the atoi function is:
#include <stdlib.h>Applies To
In the C Language, the atoi function can be used in the following versions:
- ANSI/ISO 9899-1990
Similar Functions
Other C functions that are similar to the atoi function:
- atof function <stdlib.h>
- atol function <stdlib.h>
- strtol function <stdlib.h>
- strtoul function <stdlib.h>
See Also
Other C functions that are noteworthy when dealing with the atoi function:
- strtod function <stdlib.h>
Databases
- SQL
- Oracle / PLSQL
- SQL Server
- MySQL
- MariaDB
- PostgreSQL
- SQLite
MS Office
- Excel
- Access
- Word
Web Development
- HTML
- CSS
- JavaScript
- Color Picker
Programming
- C Language
More
- ASCII
- Unicode
- Linux
- UNIX
- Techie Humor

C Language
- Introduction
- Compiling and Linking
- File Naming
- Preprocessor Directives
- #include
- #define
- #undef
- #if
- #ifdef
- #ifndef
- #elif
- #else
- #endif
- #warning
- #error
- Comments
- Variables
- Integer Variables
- Float Variables
- First Program

assert.h Functions
- assert

ctype.h Functions
- isalnum
- isalpha
- iscntrl
- isdigit
- isgraph
- islower
- isprint
- ispunct
- isspace
- isupper
- isxdigit
- tolower
- toupper

locale.h Functions
- localeconv
- setlocale

math.h Functions
- acos
- asin
- atan
- atan2
- ceil
- cos
- cosh
- exp
- fabs
- floor
- fmod
- frexp
- ldexp
- log
- log10
- modf
- pow
- sin
- sinh
- sqrt
- tan
- tanh

setjmp.h Functions
- longjmp
- setjmp

signal.h Functions
- raise
- signal

stdarg.h Functions
- va_arg
- va_end
- va_start

stdio.h Functions
- clearerr
- fclose
- feof
- ferror
- fflush
- fgetc
- fgetpos
- fgets
- fopen
- fprintf
- fputc
- fputs
- fread
- freopen
- fscanf
- fseek
- fsetpos
- ftell
- fwrite
- getc
- getchar
- gets
- perror
- printf
- putc
- putchar
- puts
- remove
- rename
- rewind
- scanf
- setbuf
- setvbuf
- sprintf
- sscanf
- tmpfile
- tmpnam
- ungetc
- vfprintf
- vprintf
- vsprintf

stdlib.h Functions
- abort
- abs
- atexit
- atof
- atoi
- atol
- bsearch
- calloc
- div
- exit
- free
- getenv
- labs
- ldiv
- malloc
- mblen
- mbstowcs
- mbtowc
- qsort
- rand
- realloc
- srand
- strtod
- strtol
- strtoll
- strtoul
- system
- wcstombs
- wctomb

string.h Functions
- memchr
- memcmp
- memcpy
- memmove
- memset
- strcat
- strchr
- strcmp
- strcoll
- strcpy
- strcspn
- strerror
- strlen
- strncat
- strncmp
- strncpy
- strpbrk
- strrchr
- strspn
- strstr
- strtok
- strxfrm

time.h Functions
- asctime
- clock
- ctime
- difftime
- gmtime
- localtime
- mktime
- strftime
- time
Home | About Us | Contact Us | Testimonials | Donate
While using this site, you agree to have read and accepted our Terms of Service and Privacy Policy.
Copyright © 2003-2026 TechOnTheNet.com. All rights reserved.
Tag » What Is Atoi In C
-
C Library Function - Atoi() - Tutorialspoint
-
Write Your Own Atoi() - GeeksforGeeks
-
Atoi() — Convert Character String To Integer - IBM
-
Atoi Is A Function In The C Programming Language That ... - Wikibooks
-
Atoi() Function In C - Javatpoint
-
ATOI Function In C - Linux Hint
-
[C언어/C++] Atoi, Atof, Atol 함수 (char* To Int) - 개발자 지망생
-
Atoi - Convert String To Integer
-
Atoi In C++: An Ultimate Guide To Atoi() Function - Simplilearn
-
What Is An Atoi Function In C Programming? - Quora
-
Where Did The Name `atoi` Come From? - Stack Overflow
-
C Atoi() Function With Examples | Learn ETutorials
-
- Atoi()
-
Atoi