Can you implement a hash table data structure in C, and write functions to insert, delete, and search elements in the table, and explain how it works and what are its advantages and disadvantages?