程序代写代做 C Programming Task 3

Programming Task 3
Develop a C program called sort.c with the following specifications:
The program will accept a single command line argument representing the path to a text file containing the values of these integers. There will be multiple integers per line. There number of lines, and the number of integers per line are unknown. You can assume that the maximum length of a line is 80.
The program will read all integers from the text file in part a into an array of integers.
The program will sort this array of integers in ascending order (any sorting technique can be used).
The program will print out the sorted array on a single line, with the individual array elements separated by a single white space.
Programming Task 4
Develop a C program called my_cat.c that emulates the primary functionality of the Unix tool cat. Specifications for my_cat are as follows:
Your program my_cat reads a text file as specified by the user and prints its contents exactly as is.
Your program my_cat can be invoked with one or more files on the command line; it should just print out each file in turn.
In all non-error cases, my_cat should exit with status code 0, usually by returning a 0 from main() (or by calling exit(0)).If no files are specified on the command line, my_cat should just exit and return 0. Note that this is slightly different than the behavior of normal UNIX cat (if you’d like to, figure out the difference).
If the program tries to read a file and fails, it should print the exact message “my_cat: cannot open file” (followed by a newline) and exit with a status of code 1.
If multiple files are specified on the command line, the files should be printed out in order until the end of the file list is reached or an error opening a file is reached (at which point the error message is printed and my_cat exits).