Argument parsing in ANSI C has several helper functions.

The atoi() function is commonly used.

In C99 a new atoll() function was created.

On GNU / Linux systems /usr/bin/c99 will compile your ANSI C to C99 standard.

If you use /usr/bin/c99 and asprintf() function in your code, then you might want to include the following line, just before your include <stdio.h>

#define _GNU_SOURCE

Having that ‘# define’ will help you avoid warnings such as:

warning: implicit declaration of function ‘asprintf’

Links: