Okay my example wasn't the best, but imagine that you are making a word processing program
you could do this
Code:
char doc[1000];
With this variable when the user types more than 1000 characters the program will crash due to buffer overflow, but if you do this:
Code:
char *doc;
The document can be any length