[Previous]
[Contents]
[Next]

atoi()

convert a string to integer representation

Synopsis:

#include <stdlib.h>

int atoi( const char *ptr );

Description:

The atoi() function converts the string pointed to by ptr to int representation.

Returns:

The converted value.

Examples:

#include <stdlib.h>

void main()
  {
    int x;

    x = atoi( "-289" );
  }

Classification:

ANSI

Safety:
Interrupt handler Yes
Signal handler Yes
Thread Yes

See also:

atol(), itoa(), ltoa(), sscanf(), strtol(), strtoul(), ultoa(), utoa()


[Previous]
[Contents]
[Next]