liveBook · Manning

Header file

A header file is a source file containing declarations, macros, or other shared interface information intended for inclusion in other 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 →

Also covered in

What to know first

Related concepts

Questions about header file

What is header file?

A header file is a source file containing declarations, macros, or other shared interface information intended for inclusion in other source files during compilation.

Which Manning books explain header file?

Modern C, Third Edition and Modern C.

What should I know before learning header file?

Manning books that teach header file usually introduce macro and size_t first.

What is header file a kind of?

Header file is a kind of source file. A source file is a file containing program text written in a programming language for processing by tools such as compilers or interpreters.

What is header file part of?

Header file is part of include. An include directory is a filesystem directory containing header files needed by software compilation.

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.