Assignment 9 - Vectors 2

Due: Wednesday, April 22, 2026, at 10pm

Starter code: a89_vector.zip
Upload solutions via Gradescope


This assignment is a continuation of Assignment 8. Read through that assignment for full details.

Part 2: Assignment 9

Now that you’ve gotten started on this assignment, let’s use the header file more properly. Remove the struct definition/typedef from vector.c and instead include the vector.h header file:

#include "vector.h"

Note that for includes that aren’t part of the C standard library, you’ll use quotation marks rather than angle brackets.

Test your code using ./test-cr and ./test-ad; the results of the tests should not have changed from before removing the struct definition: the version in vector.c should have been identical to the version in vector.h.

Implement any remaining functions from vector.h that you skipped in Part 1, and modify your insert to make the array automatically double in size when needed (as described in the comment for insert).


Submitting your work

As always, use ./zipitup to gather your files. There is a separate Gradescope link for this assignment versus A8.