I heard that malloc() allocates memory from the heap which doesn't go away until you free() the memory, but when I run this program, I get "Hello" for the initialize() funtion and "(null)" for the main function. Can anyone tell me why this is so?
Line 19: HashTable[1] doesn't exist. You mean HashTable[0], right?
Also, you are allocating a chunk of memory on line 27 but never freeing it. There is no need to use it, though. Just strcpy() the string directly to the target array/buffer.