How to implement a hash table in C