convert a string to integer representation
#include <stdlib.h> int atoi( const char *ptr );
The atoi() function converts the string pointed to by ptr to int representation.
the converted value
atol(), itoa(), ltoa(), sscanf(), strtol(), strtoul(), ultoa(), utoa()
#include <stdlib.h> void main() { int x; x = atoi( "-289" ); }
ANSI
All (except DOS/PM)