Atoi() - C library function Program


Declaration :

Explanation :

Purpose The C library function int atoi(const char *str) converts the string argument str to an integer (type int).
Parameters str ===> This is the string representation of an integral number.
Return Value This function returns the converted integral number as an int value. If no valid conversion could be performed it returns zero.
Exception

C Program : Example

The following example shows the usage of atoi() function.

Output :