Homework 1

Points: 100
Due Date: Monday, October 11, 1999 at 11:59PM

  1. (7 points) Chapter 1, exercise 1
  2. (14 points) Chapter 1, exercise 2
  3. (5 points) Chapter 1, exercise 3
  4. (12 points) Chapter 1, exercise 5
  5. (6 points) Chapter 1, exercise 7
  6. (6 points) Chapter 1, exercise 13
  7. (6 points) Chapter 1, exercise 14
  8. (9 points) Robust Programming handout, exercise 2
  9. (5 points) Robust Programming handout, exercise 17
  10. (30 points) This exercise asks you to look at a standard UNIX C library for problems with robustness. Please write three programs that use functions from the standard I/O library. You are to call the functions in such a way that they cause the program to crash, or generate unpredictable results. To demonstrate "crashing," use gdb output to show that the crash occured within the standard I/O library function. To demonstrate "unpredictable results," run your program (without changes) on at least two different types of computers in the CSIF (for example, once on a DEC and once on an SGI) and show that the results of the function differ (you can use gdb, or print the relevant values). Important note:you must supply the correct type of argument for the functions. You may not, for example, pass a character pointer where a file pointer is expected.
    Please submit both the programs and typescripts for each program showing the crash or the unpredictable results.

Send email to cs153@csif.cs.ucdavis.edu.

Department of Computer Science
University of California at Davis
Davis, CA 95616-8562

Page last modified on 9/30/99