Parsing Integer to String C

c, int, parsing, string

Solution

If you want to convert an integer to string, try the function `snprintf()`.

If you want to convert a string to an integer, try the function `sscanf()` or `atoi()` or `atol()`.

Problem

How does one parse an integer to `string(char* || char[])` in C? Is there an equivalent to the `Integer.parseInt(String)` method from Java in C?

Original source