atoi function


The C library function int atoi(const char *str) converts the string argument str to an integer (type int). If no valid conversion could be performed, it returns zero. In most implementations, pasing a null pointer will cause a segementation fault. ^ Replaced by strtol

Library:   stdlib.h

Prototype: int atoi(const char *str)

Syntax:	  


Example:

example program.


See also:

atof String to floating point conversion.
atol String to long integer conversion.
strtod String to double conversion.
strtol String to long integer conversion.
strtoul String to unsigned long integer conversion.


Top Master Index Keywords Functions


Martin Leslie