Header files are used for the following reasons:
- Header files remove the clutter of function prototypes and the declaration of custom types from the source file. They are moved to a header file to be included in the source file.
- For functions that are called from a different source file, the inclusion of the header file with those function prototypes provides access to those functions. Simply including the header file then makes them available within that program.
- For custom data types that are used in other source files, the inclusion of the header file with those custom data-type declarations makes those custom types known within the other source files.
- Header files provide a means to organize all of the C Standard Library header files, as well as our own header files, into a single header file. An example of this would be a source file that includes, say, stdio.h, stdlib...