Making a program take a variable number of arguments
I'm trying to write a program which takes a variable number of input file arguments at the command line, but I'm getting a little lost on how to do it. The program will basically need to take a variable number of files, get their lengths then write them concurrently to a single output file and create an index of where each input file can be found in the output file. That bit I can handle (I think) but I've never written any programs which take a non-set number of command line arguments.
Googling brings up a load of stuff about vscanf, but I couldn't really unerstand what it was on about (or even if it was relevant), so any example code or help to do what I want to do would be great, cheers! :)