Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Carlos Coronel, Steven Morris

14th Edition

978-0357673034

More Books

Students also viewed these Databases questions