Homework 6
Sorry, book based assignments here.
This homework is worth 15 points.
Goals
When you finish this homework you should:
- Continued to explore low level I/O.
Assignment
Write any combination of the following programs totaling 15 points.
- 7 points: Problem 4.1 page 87. You must only use read/write. If -a is not given truncate the file.
- 7 points: Problem 4.2 page 87. You must use read/write for I/O.
- 3 points: Problem 5.1 page 110. You must include in the comments to the program a discussion of what occurred.
- 5 points: Problem 5.2 page 110. Include a discussion in the comments of what happened and why. Make sure your program demonstrates the principal involved.
- 10 points: Problem 5.3 page 110 - 111. Include a summary of your findings in the comments for your program.
- 10 points: Problem 5.4 page 111. Make sure you provide a program or set of programs which thoroughly test your routines.
- 3 points: Problem 5.5 page 111. Include a summary of why you believe that your program verifies the behavior in the comments of your program.
Discussion
- Most problems involve a discussion. Make sure that this is included in the comments of your program. Please do not throw that portion away, I will deduct points for an incomplete or missing discussion.
- Since this is the section on low level I/O I expect most of the I/O to be done with read/write.
- You may answer as many questions as you wish, but I will stop grading once you reach 15 points. You may not receive more than 15 points for this assignment.
Submission
Email a copy of the C code to complete the final task to your instructor by class time. If your code consists of a single file, the source code will be sufficient, if the code is in multiple files, you should submit a tar file containing the source code and a make configuration file required to build the project.