Currently At: Programming Reference > C Reference > Standard C String & Character > atoi()

atoi()


Syntax:
#include <stdlib.h>
int atoi( const char *str );


Description:
The atoi() function converts str into an integer, and returns that integer. str should start with some sort of number, and atoi() will stop reading from str as soon as a non-numerical character has been read.

Example:
i = atoi( "512.035" );

RESULT: i set to 512.


Related Topics:
atof(), atol()


Web Standards & Support:

Link to and support eLook.org Powered by LoadedWeb Web Hosting
Valid XHTML 1.0! Valid CSS! eLook.org FireFox Extensions