atoi

Converts a string to an integer.

int atoi (char * string);

Required Header
<stdlib.h>

Return Value

This function returns the integer representation of string.

Parameters

string

  The string to be converted to an integer

Remarks

The atoi function converts string to an integer number, where the conversion stops at the first character that is not recognisable as a number in the form:

[whitespace][sign][digits]

Standard Library

See Also    atol, strtol, strtoll, strtoul, strtoull, strtod