liveBook · Manning

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.

How 2 Manning books explain it

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.

Read how Modern C, Third Edition explains header file →

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.

Read how Modern C explains header file →

Related concepts

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.