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, 23.06.2019 03:30
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
What are three software programs for mobile computing?
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe and
Answers: 1
question
Computers and Technology, 24.06.2019 09:50
Suppose you are an ad-serving company and you maintain a log of cookie data for ads you serve to the web pages for a particular vendor (say amazon). a. how can you use this data to determine which are the best ads? b. how can you use this data to determine which are the best ad formats? c. how could you records of past ads and ad clicks to determine which ads to send to a given ip address? d. how could you use this data to determine how well the technique you used in your answer to part c was working? e. how could you use this data to determine that a given ip address is used by more than one person? f. how does having this data give you a competitive advantage vis-à-vis other ad-serving companies?
Answers: 2
You know the right answer?
Concatenating to files into a third one:. You are asked to write a program that generates an output...
Questions
question
Mathematics, 21.09.2019 18:30
Questions on the website: 13722367