Computer Science 102

Lab 1

In this lab you will complete the implementation of the functions whose prototypes are found in the file vector.h. You must use the vec_t type that is defined in vector.h.

You may also use the file main.c as the starting point for a test driver of your vector functions. However, main.c is neither complete nor particularly robust.

Always compile your programs using the -Wall compiler flag. Deductions will be made if your program generates compiler warnings. Since the test main() includes vector.h, you should compile using:

gcc -g -Wall main.c -lm

When you are confident your vector functions are working correctly turn in your code using the sendlab command. The general syntax of this command is

sendlab.102.labsection# lab# file1 file2 file3

Since this is lab1 and if you are in section 2 the command you should use is:

sendlab.102.2 1 vector.h

Mike Westall

2007-01-17T09:19:32