CS 355 - Systems Programming Lab 2 - Command line programming and strings
Objective: write a program that can accept command line parameters and produce output to the terminal.
- Write a C program myprog that can accept an arbitrary number of command line arguments, e.g.
myprog Hello, world!
You are not allowed to use any standard string manipulation functions from <string.h>.
myprog must print each argument starting with the first character on the first line, two characters on the second line, etc. myprog must exclude all characters other than a through z and A through Z. For the parameters specified above, myprog must produce the following output:
H
He
Hel
Hell
Hello
W
Wo
Wor
Worl
World
Use three test cases to verify the correctness of your code as follows:
-
myprog
-
myprog Have a nice day!
-
myprog paraskevidekatriaphobia = Friday 13.
- A single C source code file with your work.
- A screenshot (in PNG or JPG format) showing your program executing each of the three test cases on a Linux terminal.