Solution for Exercise 15-3

ex1503

#include <stdio.h>

int main(int argc, char *argv[])
{
    printf("You typed %d arguments.\n",argc);
    printf("That argument is %s.\n",argv[0]);
    return(0);
}

Notes

* argv[0] is always the name of the program running.