In C, the function main() returns an int (except in implementations that defy the Standard). The function main() either takes no parameters or takes 2 parameters (except in implementations that defy the Standard): the first one of type int and the second one of type char **. The names of the parameters are up to the programmer, but nearly everyone always uses argc and argv.

Code:

int main(void) { /* ... */ }

Code:

int main(int argc, char **argv) { /* ... */ }

Code:

int main(int argc, char *argv[]) { /* ... */ }

The parameters supply information to the program about any command line arguments passed in: argc is a count of the arguments, and argv elements are those arguments.
Changing the values of the variables, while allowed, is very bad form (and may even crash the program in some situations).

What you want to do is allocate space for the concatenad result, and loop until all command line arguments are exhausted

concat_strings() not only concatenates the strings, it also does a couple of other useful things:
1. It returns the actual # of bytes used after the strings are concatenated.
2. It returns whether it successfully managed to concatenate the strings or not.

... The example I posted above should concatenate the two strings correctly.

Note that your example relies on C99's snprintf().
If the OP is using a C89 compiler that accepts snprintf() as an extension it's anybody's guess what his snprintf() accepts and returns (I couldn't find any relevant information on the AS400 compiler and the Windows library is not C99 compatible).