subject
Computers and Technology, 19.03.2021 15:40 kx123

Concatenating to files into a third one:. You are asked to write a program that generates an output file, the context of which is derived by concatenating the contexts of two input files. Your program will be labeled myfiles and will take two or three arguments. The first and second arguments must be the input files, while the third argument must be the output file. The default name for the output file is myfile. out
Note 1: If your program is run without the proper arguments, you must make sure that the proper message appears on screen that guides the user into how many and what sort of arguments are required. If one of the input files provided in the arguments does not exist, then the program must print on screen the corresponding error message.
Note 2: Execute your program using OS instruction strace (research on how this works). Copy the output of strace that is produced from your code.
Note 3: Modify your initial code to support indefinite number of input files. The last argument though is always the output file. For your implementation you are expected to use the following functions: void WriteInFile (int fd, const char *buff, int len): writes data to file descriptor fd. void CopyFile (int fd, const char *file-in): writes the contexts from file named file-in to file descriptor fd. WritelnFile is called from within CopyFile.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:00
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
Match the file formats with the types of multimedia they can store
Answers: 2
question
Computers and Technology, 24.06.2019 00:00
The gene form of a trait is called a(n) 
Answers: 2
question
Computers and Technology, 24.06.2019 00:10
Read each statement below. if the statement describes a peer-to-peer network, put a p next to it. if the statement describes a server-based network, put an s next to it. p - peer-to-peer s - server-based
Answers: 1
You know the right answer?
Concatenating to files into a third one:. You are asked to write a program that generates an output...
Questions