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