in reply to
Re^2: How to write a program to read stdin or command line?
in thread How to write a program to read stdin or command line?
Homework: 3. preparatory reading or research
The fact that you are a professional actually supports my point. It should have been dead easy for you to find how to check for parameters. Homework needs not be assigned by a school. It can be self-assigned, as it should have been in this case. Sounds like you could use a refresher.
There was no malice in my reply. The idea was to influence others not to give an outright answer in order to influence the poster to actually do his own homework.