Handling variable inputs

Hi,

Is there any way to handle variable inputs.
If an application handles more than one input
how to print the input values.

Example :

./a.out 1 "hi" 3
./a.out 1
./a.out 1 3 4 "hello"

output should be:

1
hi
3

1

1
3
4
"hello"

Thanks in advance

Here is one way

#include <stdio.h>

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

   argv++;

   while (*argv)
      printf("%s\n", *argv++);

}