atol (programming)
Appearance
The atol function in C programming language and C++ converts a string of a numerical representation into a long integer. When used, the function is included from the stdlib.h
header.
The atol
function has a prototype as follows:
long atol (const char *string)
Where string
is the string, represented by an array of characters, terminated or intercepted by any non-numerical character, to be converted to the integer. The required integer is returned.