Question: COP-4600 Assignment 9 Part I . code is C Using the source code below write a Windows program that uses a system call to copy

COP-4600 Assignment 9 Part I. code is C

Using the source code below write a Windows program that uses a system call to copy a file as its done through GUI. The program takes both file names from command-line. Make sure to include in CodeBlocks the files names in Project/Set Programs Arguments. The original file should be in the same directory.

Deliverables: Source code as text and output as screenshot.

COP-4600 Assignment 9 Part I. code is C Using the source codebelow write a Windows program that uses a system call to copy

1 File copy program. Error checking and reporting is minimal. / #include /* include necessary header files */ #include #include #include #include #de fine TRUE! #define BUF-SIZE 4096 /* use a buffer size of 4096 bytes */ #de fine OUTPUT-MODE 0700 /* protection bits for output file */ 4 6 7 9 10 11 int main (int argc, char argv[]) [ 12 13 14 15 16 17 18 19 20 21 int in fd, out fd, rd count, wt count char buffer [BUF_SIZE] if (argc != 3) exit (1)syntax error if argc is not 3*/ /Open the input file and create the output file / in fd = open (argv [1], O RDONLY); /* open the source file */ if (in fd

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!