Advacned C Programms

  • Creating Hashtable Using C (Username & Password Authenticator)


  • What you need to know before starting to learn Hashtables in C

  1. Dynamic Memory Allocation (Malloc).
  2. Structures.
  3. How to create a List using Structures.
  • How to create a Hashtable
  1. Creathe the Structure with the data(username & password) + one more variable that  is the same Structure type as the one you created. For Example:save1
  2. Make a dynamical 1-D array  (malloc)save2
  3. The “T” array should contain all the “Heads” of the Lists (*(T+index)=NULL)save3
  4. If there is no “item” in *(array + example_index) add it there.
  5. Else (if there is already one item in possition *(array + example_index) ) create a new node add it there, Like so:save4
  6. The method hash() give’s you the “example_index” (the location of the item).
  7. Write your own code, to fully understand HashTables.
  8. Use this as Guidance.

Buy The Complete Code Here