/* A simple program that prints its PID and command line arguments to
 * standard output.
 *
 * Created by Jerod Weinman (29 August 2008)
 */

#include <stdio.h>
#include <unistd.h>          /* needed for getpid procedure */

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

     printf("My pid = %d: ",getpid());

     /* Print everything but the last argument followed by a space */
     int i;
     for (i=0 ; i<argc-1 ; i++)
     {
          printf("%s ", argv[i]);
     }

     /* Print the last argument followed by a newline */
     printf("%s\n",argv[argc-1]);

}
