Home > Electronics Tutorials > C Language Tutorial > stdlib.h - String Functions - atoi

C Language Programming Library Reference Guide

stdlib.h - String Functions - atol

Declaration: long int atol(const char *str); The string pointed to by the argument str is converted to a long integer (type long int). Any initial whitespace characters are skipped (space, tab, carriage return, new line, vertical tab, or formfeed). The number may consist of an optional sign and a string of digits. Conversion stops when the first unrecognized character is reached.

On success the converted number is returned. If the number cannot be converted, then 0 is returned.

Note: To report broken links or to submit your projects, tutorials please email to Webmaster

Discover

     more......