Create a week09 directory in your weeklylab subdirectory and copy over some files:
    cd cs31/weeklylab
    pwd
    mkdir week09
    ls
    cd week09
    pwd
    cp ~kwebb/public/cs31/week09/* .
    ls
To start off, we're going to learn how to write a C library and how to use it in a program. Let's take a look at mylib.h, mylib.c, and prog.c, a program that uses them.
Tia has written some good documentation on creating libraries in C. I would suggest referring to that if you need to brush up on any details.
int array[10], *ptr, *start, num;
ptr = array;
start = ptr;
*ptr = 6;  // puts 6 in bucket 0 of the array
ptr = ptr + 3;  // make ptr point to bucket 3 of the array
                // which is at address 12 beyond the current value of ptr
*ptr = 8;  // puts 8 in bucket 3 of the array
num = ptr - start;  //
In the example code, using pointer arithmetic is not necessary (the same functionality can be accomplished without using pointer arithmetic), but it is handy to use in some cases.
Let's try out the first TODO item in this file and run and test it.
Now let's look at the man page for strchr and for isspace, then let's try out the second TODO and test it out.
When reading man pages, there are certain key pieces of information you'll want to look at: