Ok, this is a C programming homework question. But I\'m truly stuck.
I ask the user to input words, and then I insert the input into an array, but I can\'t have any
You can realloc it every time like:
int size = 0; char **array = malloc(0); while(/* something */) { char *string = // get input size++; array = realloc(array, size * sizeof(char*)); array[size - 1] = string; }
Or in chunks if you care about speed.