Implementation of a vector in C