hashing with chaining c code

hashing with chaining c code

here is the hashing with chaining code am having some pointer doubts here
struct hash *hashTable = NULL;
int eleCount = 0;
struct node {
int key, age;
char name[100];
struct node *next;
};
struct hash {
struct node *head;
int count;
};
struct node * createNode(int key, char *name, int age) {
struct node *newnode;
newnode = (struct node *)malloc(sizeof(struct node));
newnode->key = key;
newnode->age = age;
strcpy(newnode->name, name);
newnode->next = NULL;
return newnode;
}
void insertToHash(int key, char *name, int age) {
int hashIndex = key % eleCount;
struct node *newnode = createNode(key, name, age);
/* head of list for the bucket with index "hashIndex" */
if (!hashTable[hashIndex].head) {
hashTable[hashIndex].head = newnode;
hashTable[hashIndex].count = 1;
return;
}
/* adding new node to the list */
newnode->next = (hashTable[hashIndex].head);
/*
* update the head of the list and no of
* nodes in the current bucket
*/
hashTable[hashIndex].head = newnode;
hashTable[hashIndex].count++;
return;
}
how has hashTable turned into an array it was a pointer to hash right??
and what actually is
struct hash {
struct node *head;
int count;
};
am not getting how this structure is actually working?? can we convert any
pointer to a structure as an array???