Syntax of atoi() Function

int atoi(const char *strg);

atoi() Function in C

In C, atoi stands for ASCII To Integer. The atoi() is a library function in C that converts the numbers in string form to their integer value. To put it simply, the atoi() function accepts a string (which represents an integer) as a parameter and yields an integer value in return.

C atoi() function is defined inside <stdlib.h> header file.

Similar Reads

Syntax of atoi() Function

int atoi(const char *strg);...

Parameters

strg: The string that is to be converted to an integer....

Return Value

The atoi() function returns the following value:...

Examples of atoi() in C

Example 1:...

How to Implement Your Own atoi() in C?

...

Properties of atoi() Function

...

Conclusion

The equivalent of the atoi() function is easy to implement. One of the possible method to implement is shown below:...

Contact Us