Solution for Exercise 15-1

ex1501

#include <stdio.h>

int main(int argc, char *argv[])
{
    if(argc>1)
        printf("Greetings, %s!\n",argv[1]);
    return(0);
}

Notes

* I a program similar to this when I first learned to program. Its name was greet. I would place the command greet Dan into the computer's startup file. Each time I started my day, the screen said, "Greetings, Dan!"