EE 3233 Systems Programming for Engrs (Fall 2018) Programming Assignment 1 Name: Score:/70 Submit the assignment at the blackboard. The file name should be named as name HW1.c Due date: Monday, 24th of the September 2018 by 11:59 PM 1. Late submission won't be accepted 2. Shared code (except reference code as directed) will bring severe consequence-code scanning will be performed by default. Write a C code that copies one file from the source file to destination file with two offset values as follows: $.ame HW1 source file src off destination file dst off 1. name HW1 program copies the contents of source file (source file) from (src off+ 1) byte to the end of the source file to the destination file (destination file) at (dst off+ 1) 2. The program should accept following commands: S.ame HW1 source file destination file S.ame HW1 source file src off destination file S.ame HW1 source file destination file dst off If the offset option is omitted, by default, the omitted offset becomes 0. Other than three commands specified above, an error message should be returned if you try a command such as S.ame HW1 src off source file dst off destination file S-ame HW1 source file destination file src off dst off 3. Validation check should be performed for offset values (negative and float offsets are not accepted). 4. If the destination file exists, existing content of that file should be preserved. The contents of the destination file will be kept before and including the dst off 5. When the specified starting point to copy is greater than the file size of the source file, nothing will be copied (the size of the destination file will be zero if the destination file does not exit). Tips: Use .getint( .-T or .getLong(-)" functions to convert the numeric input string to integer defined in tipi hdr.h header file. You can refer two sample codes (ileio/copy.c and fileio/seek io.c) covered in the lecture. Work in the 'fileio directory given in the source file distribution of the textbook and Compile using 'make name, HW1 (without cr EE 3233 Systems Programming for Engrs (Fall 2018) Programming Assignment 1 Name: Score:/70 Submit the assignment at the blackboard. The file name should be named as name HW1.c Due date: Monday, 24th of the September 2018 by 11:59 PM 1. Late submission won't be accepted 2. Shared code (except reference code as directed) will bring severe consequence-code scanning will be performed by default. Write a C code that copies one file from the source file to destination file with two offset values as follows: $.ame HW1 source file src off destination file dst off 1. name HW1 program copies the contents of source file (source file) from (src off+ 1) byte to the end of the source file to the destination file (destination file) at (dst off+ 1) 2. The program should accept following commands: S.ame HW1 source file destination file S.ame HW1 source file src off destination file S.ame HW1 source file destination file dst off If the offset option is omitted, by default, the omitted offset becomes 0. Other than three commands specified above, an error message should be returned if you try a command such as S.ame HW1 src off source file dst off destination file S-ame HW1 source file destination file src off dst off 3. Validation check should be performed for offset values (negative and float offsets are not accepted). 4. If the destination file exists, existing content of that file should be preserved. The contents of the destination file will be kept before and including the dst off 5. When the specified starting point to copy is greater than the file size of the source file, nothing will be copied (the size of the destination file will be zero if the destination file does not exit). Tips: Use .getint( .-T or .getLong(-)" functions to convert the numeric input string to integer defined in tipi hdr.h header file. You can refer two sample codes (ileio/copy.c and fileio/seek io.c) covered in the lecture. Work in the 'fileio directory given in the source file distribution of the textbook and Compile using 'make name, HW1 (without cr