(put an explanation in your answer as well).
Lines 9-11 begin at Rio_readinitb and end at Rio_writen. Be careful, there is a specific way to write this program (it relates to a function discussed in class).
The fourth problem is fully listed in the assignment description.
For Assignment H2, use the csapp.c and csapp.h files listed in the course page, under “PROGRAMS” in the menu on the left. Do not download the scripts from the internet; do not use the versions of these scripts that were in this week’s ICE. The versions from the ICE have debugging statements that will interfere with your testing. Also, versions from the internet are outdated and you might get a mismatch between your header file and your script file. Don’t do it. Just download the files, from PROGRAMS, and use those, they are up-to-date.
You may submit csapp.c, csapp.h, if you want, with any of the assignments. If you do not submit them, that’s okay, we’ll still pull them in and include them when compiling.
If you use an outdated csapp.c file with your code, and I pull in the latest version and it does not compile, that will be a problem. I will use the csapp.c file you provide, if it exists, but, please, try to use the files that are on the course site. This will save you and your TAs a lot of time.
Let’s keep things consistent.
it’s four parts, equally weighted. As a general rule for all assignments, if the answer for a problem requires submitting code, then submit it in a .c file. Questions that do not require a code answer should probably go in a .txt file. Again, no zip, please.
So, for this assignment, I’d expect the following:
CSAPP Problem 10.6: submit a .txt file that has the output of the program and an explanation. I want an explanation with this, tell me why the output is what it is, don’t just run it and copy/paste the output. No explanation = no credit.
CSAPP Problem 10.8: submit a .c file. I’ll run it with command line args, e.g. “./p2 0” should give me information for descriptor number 0 (stdin).
CSAPP Problem 10.10: submit a .c file. I’ll run it twice, once without args “./p3” and once with args “./p3 myfile.txt”. If no args are provided, it should copy stdin to stdout. If args are provided, it should copy the file contents to stdout. Note that the filename provided in the args might differ from the example. That is, don’t hardcode in a filename. EDIT: per instructions, use the original copy loop code. Hint: there is a specific way that this code should be written. If you do not use the original code, then, don’t expect much credit to be given.
tee: submit a .c file. I’ll do probably four runs, “./tee fileDoesNotExist”, “./tee fileExists”, “./tee -a fileExists”, “./tee -a fileDoesNotExist”. Per the instructions, if the -a flag is not set, tee will read stdin and copy it to stdout and to the file, overwriting it in the process. If -a is set, then tee will append if the file exists. So, given these inputs, expect these outputs:
“./tee fileDoesNotExit” : copy stdin to stdout, copy stdin to fileDoesNotExist (creates the file)
“./tee fileExists” : copy stdin to stdout, copy stdin to fileExists (overwrites original contents)
“./tee -a fileExists” : copy stdin to stdout, copy stdin to fileExists (appends to original contents)
“./tee -a fileDoesNotExist” : copy stdin to stdout, copy stdin to fileDoesNotExist (creates the file)
If any of this is confusing, please, let me know. Use reasonable file names, e.g. part1.c, part2.c, …, or q1.c, q2.c, …, or 10.6.c, 10.8.c, 10.10.c, tee.c, etc. Don’t submit confusing filenames. You are more than free to submit a README or a Makefile with your assignment submission.
Follow the specifications above. Use command line args as specified. Do not prompt me to enter in the filename, or the descriptor number, from stdin.
Buy an essay in any subject you find difficult—we’ll have a specialist in it ready
Ask for help with your most urgent short tasks—we can complete them in 4 hours!
Get your paper revised for free if it doesn’t meet your instructions.
Contact us anytime if you need help with your essay
APA, MLA, Chicago—we can use any formatting style you need.
Get a paper that’s fully original and checked for plagiarism