I'm working on some homework for my C class and I'm not sure how to approach this. I'm told to 'allocate from the heap a hash table with htsize buckets, each initially empty.' I've already made htsize specifiable via command line arguments and made it a global variable in the following code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
int htsize;
int main(int argc, char *argv[])
{
if (argc <= 1)
{
printf("Please declare a table size");
return 1;
}
htsize = atoi(argv[1]);
}
but I am not sure what 'allocating from the heap' entails. Can someone help break this down for me?