title: Search won't work on hash table
body: <p>I can't figure out why my search code won't work in hash table. I already tried inserting printf on every line just to see the flow of code and it was right, but I still can't seem to get the right output. This program saves words on hashtable alphabetically and it uses linked list. So if I search a word that starts with 'A' it must return Key:1 and so on. I'll appreciate any help you can give :)</p>
  
  <pre><code>void searchInHash(int key, char *name) {
      int hashIndex = key, flag = 0;
      struct node *myNode;
      myNode = hashTable[hashIndex].head;
      if (!myNode) {
          printf("Search element unavailable in hash table\n");
          return;
      }
      while (myNode != NULL) {
          if (myNode == name) {
              printf("Key: %d\n", hashIndex);
              flag = 1;
              break;
          }
          myNode = myNode-&gt;next;
      }
      if (!flag)
         printf("Search element unavailable in hash table\n");
      return;
  }
  </code></pre>