atol()

Syntax

  #include <stdlib.h>


  
  long atol(const char *s);

  
Description

atol() converts the string s to an long 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 the followingatol() is as follows:

  Number = [+|-]Digit{Digit} 
  
Return

atol() returns the converted long value.

See also

atoi()

atof()

strtod()

strtol()

strtoul()