C - Header files

From EdWiki

Header files

  • If the C program is broken down into several source files, and the variables and/or functions are shared among those source files, the common practice is to collect all the common declarations and place it into a file called header file.
  • The suffix .h is used for header files
  • Among variable and function declarations; constants and macros are also placed in the header file(s).
  • This header file(s) is included by #include at the front of each source file(s).
  • The header file(s) are processed by a C preprocessor.