Congratulations on starting to learn, are you following a tutorial of some sort? The next thing you should be learning about is dynamic memory allocation, as opposed to static allocation (size known at compile time) on the stack.
From that Wikipedia page's examples:
Creating an array of ten integers with automatic scope is straightforward in C:
int array[10];
However, the size of the array is fixed at compile time. If one wishes to allocate a similar array dynamically, the following code can be used:
int *array = malloc(10 * sizeof(int));
Obviously for your case, replace int with char and 10 with size.
And always (this is the tricky thing about dynamic allocation) remember to free() any memory you have malloced once you're finished with it!