Question: ( 5 0 points ) Complete a function concatFiles ( const char * name 1 , const char * name 2 , const char *
points Complete a function "concatFilesconst char name const char name const char name in the attached program template "prog.c After its completion, name file will have contents obtained by concatenating the contents of namel file and name file. For example, if namel file contains the following characters:
ABCDMHJWP
And, if name file contains the following characters: TUVXYZ
Then, after its execution the name file will contain characters:
ABCDMHJWPTUVXYZ
You can only make use of the following system calls in the function implementation:
a open
b read
c Iseek
d write
eclose
You have to complete the function definition in the attached "prog.c file which includes main calling dupFiledataltxt "datatxt "datal.txt file is also attached. Your function should use the buffer size of bytes in reading and writing. Please take the following requirements into account when you create the function definition:
namer file and name fle should be existent when the function is called. Otherwise, your program should exit without doing anything.
Name file should not be existent when you call the function. It needs to be created as an empty file and the contents need to be filled up If name file already exists, your program should exit without doing anything.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
