-
Notifications
You must be signed in to change notification settings - Fork 486
Expand file tree
/
Copy path2-main.c
More file actions
executable file
·27 lines (25 loc) · 739 Bytes
/
2-main.c
File metadata and controls
executable file
·27 lines (25 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "../hash_tables.h"
/**
* main - check the code for Holberton School students.
*
* Return: Always EXIT_SUCCESS.
*/
int main(void)
{
char *s;
unsigned long int hash_table_array_size;
hash_table_array_size = 1024;
s = "cisfun";
printf("%lu\n", hash_djb2((unsigned char *)s));
printf("%lu\n", key_index((unsigned char *)s, hash_table_array_size));
s = "Don't forget to tweet today";
printf("%lu\n", hash_djb2((unsigned char *)s));
printf("%lu\n", key_index((unsigned char *)s, hash_table_array_size));
s = "98";
printf("%lu\n", hash_djb2((unsigned char *)s));
printf("%lu\n", key_index((unsigned char *)s, hash_table_array_size));
return (EXIT_SUCCESS);
}