Everything

atol


Conversion of character string to integer (long type)

[Classification]

Standard library

[Syntax]

#include <stdlib.h>

long atol(const char *str);

[Return value]

Returns the converted value if the partial character string could be converted. If it could not, 0 is returned.

[Description]

This function converts the first part of the character string indicated by str into a long int type representation. atol is the same as "strtol (str, NULL, 10)".