A function declaration specifies the function name, argument types, and return type, so the compiler can check your usage. A function declaration doesn't allocate space for the function code. A variable definition causes memory to be allocated to hold its value. And so for functions. But you can't define something more than once.
Libraries are collections of compiled function definitions.
The linker is happy, because there is exactly one definition of a library function. We'll talk about namespaces later. In C we use character arrays and string constants extensively. If you don't know how big the string will be, you either make a huge array, or allocate space dynamically, with malloc. In the second case, you might have to allocate more memory if the string needs to big bigger, later on.