atoi()

Syntax

  #include <stdlib.h>

  
  int atoi(const char *s);

  
Description

atoi() converts the string s to an integer value, ignoring white space at the beginning of s. It stops converting when it reaches either the end of the string or a character that cannot be part of the number. The number format accepted by atoi() is as follows:

  Number             = [+|-]Digit{Digit}

  
Return

atoi() returns the converted integer value.

See also

atof()

atol()

strtod()

strtol()

strtoul()