
     CSE 109    HW 5     Due   9 PM  Wednesday 3 December 2008

     This homework is an exercise in writing simple C programs.  Write
     a well modularized program (i.e., that makes good use of function
     calls and) that reads positive ints from the screen, puts them into
     a linked list, and then traverses the linked list, displaying the ints
     on the screen.  A negative number should act as a sentinel for the list.

     Store the program in the file "hw5.c". You should compile the program
     using the -xc option. To test your program I will compile it with
     the command
        gcc -xc hw5.c

     To submit your homework, create a subdirectory of csc109.084 called
     hw5 (that is, from your root directory /csc109.084/hw5).  The
     subdirectory hw5 should only contain the file hw5.c.

     NOTE: This homework (like all homeworks) will only be collected once.

     NOTE: In the documentation for the program, include, among other things,
     the name of your partner.

     NOTE: A well-modularized program in this case should have a main()
     that declares the variable(s) and then makes a few function calls
     to accomplish your task. Don't shy way from the function calls.
     Writing them is part of the task.

     Hints:  (1) Recall that scanf() is used for input and requires you to
                 give the address of the variable being used for input.
                 Thus, if you have int x, then the address of x is &x
             (2) You will need to pass the head of the linked list by
                 reference. Thus you have to call the function with the
                 address of a pointer variable. This, in turn, means that
                 you have to use double pointers in the body of the
                 function. This was covered in class.

