implementation of a hash table with chaining for collisions in C