liveBook · Manning

__FILE__

__FILE__ is a predefined C macro that expands to a string literal naming the current source file.

How 2 Manning books explain it

Modern C, Third Edition

__FILE__ is a predefined C macro that expands to a string literal naming the current source file.

How it is used
Supports debugging traces by identifying the source file associated with diagnostic output.
How deep it goes
Defines its string-literal expansion and debugging role, but does not develop its implementation mechanics.
Examples
Uses macro-based trace output that reports source location alongside debugging values.
What you can do after
Diagnose/debug with it by adding the originating source-file name to tracing or diagnostic output.

Read how Modern C, Third Edition explains __FILE__ →

Modern C

__FILE__ is a predefined C macro that expands to a string literal containing the name of the current source file.

Read how Modern C explains __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.