% cat licences UBT878 1 KGB209 1 TEA311 3 MUK772 1 XYZ333 2 % cc -o hash hash.c license.c % hash 0: NULL 1: NULL 2: NULL 3: license: UBT878, num: 1, hash(license): 3 4: license: KGB209, num: 1, hash(license): 4 5: license: TEA311, num: 3, hash(license): 4 6: license: MUK772, num: 1, hash(license): 5 7: license: XYZ333, num: 2, hash(license): 3 8: NULL 9: NULL 10: NULL 11: NULL 12: NULL Enter license number ---> FTK123 The 1st time for license: FTK123 0: NULL 1: NULL 2: NULL 3: license: UBT878, num: 1, hash(license): 3 4: license: KGB209, num: 1, hash(license): 4 5: license: TEA311, num: 3, hash(license): 4 6: license: MUK772, num: 1, hash(license): 5 7: license: XYZ333, num: 2, hash(license): 3 8: NULL 9: NULL 10: license: FTK123, num: 1, hash(license): 10 11: NULL 12: NULL Enter license number ---> XYZ333 The 3rd time for license: XYZ333 0: NULL 1: NULL 2: NULL 3: license: UBT878, num: 1, hash(license): 3 4: license: KGB209, num: 1, hash(license): 4 5: license: TEA311, num: 3, hash(license): 4 6: license: MUK772, num: 1, hash(license): 5 7: license: XYZ333, num: 3, hash(license): 3 8: NULL 9: NULL 10: license: FTK123, num: 1, hash(license): 10 11: NULL 12: NULL Enter license number ---> SSR474 The 1st time for license: SSR474 0: NULL 1: license: SSR474, num: 1, hash(license): 1 2: NULL 3: license: UBT878, num: 1, hash(license): 3 4: license: KGB209, num: 1, hash(license): 4 5: license: TEA311, num: 3, hash(license): 4 6: license: MUK772, num: 1, hash(license): 5 7: license: XYZ333, num: 3, hash(license): 3 8: NULL 9: NULL 10: license: FTK123, num: 1, hash(license): 10 11: NULL 12: NULL Enter license number ---> ULL585 The 1st time for license: ULL585 0: NULL 1: license: SSR474, num: 1, hash(license): 1 2: license: ULL585, num: 1, hash(license): 2 3: license: UBT878, num: 1, hash(license): 3 4: license: KGB209, num: 1, hash(license): 4 5: license: TEA311, num: 3, hash(license): 4 6: license: MUK772, num: 1, hash(license): 5 7: license: XYZ333, num: 3, hash(license): 3 8: NULL 9: NULL 10: license: FTK123, num: 1, hash(license): 10 11: NULL 12: NULL Enter license number ---> quit % cat licenses SSR474 1 ULL585 1 UBT878 1 KGB209 1 TEA311 3 MUK772 1 XYZ333 3 FTK123 1