Question: undefined Lab purpose: Understand the command line argument, its usage, and applications. Due ? Instruction: Write a program, named sortlist, that reads three to four
undefined
Lab purpose: Understand the command line argument, its usage, and applications. Due ? Instruction: Write a program, named sortlist, that reads three to four integers from the command line arguments and returns the sorted list of the integers on the standard output screen. You need to use strtol() function to convert a string to a long integer. For instance, >sortit 35 >The sorted list is 3, 5. >sortit 3 5 7 >The sorted list is 3, 5, 7. >sortit 40 9 89 >The sorted list is 0, 4, 9, 89 >sortit 1 p 9 >sortit: invalid input p >sortit >usage: sortit num1 num2 num3! Things to submit: 1. The source code of a c file 2. Screenshots (20%) that show successful execution of the testing cases such as 1. invalid input, 2. wrong usage (not enough arguments) 3. You need to use a command-line argument method. (30%) 4. Include format error checking, and input validation is required. (10%) 5. Follow the coding format as the above example
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
