Header file
A header file is a source file containing declarations, definitions, macros, or other interface information intended for inclusion in one or more source files during compilation.
Modern C, Third Edition
A header file is a source file containing declarations, macro definitions, and related information intended to be included by other source files.
- How it is used
- Organizes C library and project interfaces so source files can obtain declarations and related definitions through inclusion.
- How deep it goes
- Defines declarations, scope, and interface separation, but defers detailed header implementation mechanics.
- Examples
- Uses standard-header tables, printf and typedef declarations, EXIT_SUCCESS, terminal documentation commands, and custom-interface organization.
- What you can do after
- Apply it via standard and project headers to expose declarations while keeping interface documentation separate from implementation.
Modern C
A header file is a source file containing declarations and other material intended for inclusion before compilation.
- How it is used
- Bundles declarations into interfaces that can be included before compiling C source files.
- How deep it goes
- Explains declarations, interface grouping, dependencies, and include guards, but defers detailed library semantics to platform documentation.
- Examples
- Uses stdio.h, stdlib.h, printf, standard-library headers, and a guarded project header named brian.h.
- What you can do after
- Build interfaces from scratch by grouping related declarations, dependencies, documentation, and include guards in a project header.
Related concepts
- inline functionconfigured by · An inline function is a function defined or designated for incorporation at its use site, either syntactically or through compiler substitution, rather than necessarily invoked through an ordinary call.
- C standard libraryused by · The C standard library is the standardized collection of functions, macros, types, and related facilities provided for C programs.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

