Question: 1.Write a C program that prints out all of its command-line argumentsexcept thosethat begin with a dash. Hint: find out about argc and argv. For
1.Write a C program that prints out all of its command-line argumentsexcept thosethat begin with a dash. Hint: find out about argc and argv. For example, after compilingyour program into the file a.out, entering the commanda.out arg1-arg2 arg3
prints
arg1 arg3
including a newline so your next shell prompt is not right after arg3.If all arguments beginwith a dash, (or if there are no arguments atall) print nothing, that is, do not even print anewline. This is sothat a blank line does not appear between the a.out command line andyour next shell prompt
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
