Implementation status: implemented

Synopsis

#include <stdlib.h>

int atoi(const char *str);

Description

Function converts the string pointed to by the argument str to an integer (type int).

Arguments:
str - the string to be converted.

Return value

The atoi() function returns the converted value if the value can be represented.

Errors

No errors are defined.
The function atoi() need not affect the value of errno on an error.