When changes are made to a file, only that file need be re-compiled to rebuild the program. The UNIX make facility is very useful for rebuilding multi-file programs in this way. Where a function is spread over several files, each file will contain one or more functions. One file will include main while the others will contain functions which are called by others. These other files can be treated as a library of functions.
Programmers usually start designing a program by dividing the problem into easily managed sections.
Each of these sections might be implemented as one or more functions. All functions from each section will usually live in a single file. Where objects are implemented as data structures, it is usual to to keep all functions which access that object in the same file. All related functions are stored together. Later changes to the object require only one file to be modified.