__FILE__ is a predefined C macro that expands to a string literal containing the name of the current source file. It is a compile-time language facility, distinct from the FILE type used by C stream interfaces. section 8.3.1
__FILE__
__FILE__ is a predefined C macro that expands to a string literal containing the name of the current source file.
How Modern C covers it
- What it assumes
- Assumes familiarity with C source files and introduces the macro’s expansion directly.
- How it connects
- Distinguishes C preprocessor macros from the opaque FILE stream type.
Also explained in
-
Modern C, Third Edition__FILE__ is a predefined C macro that expands to a string literal naming the current source file.
Compare how 2 books explain __FILE__ →
Related concepts
- macrokind of · A macro is a named construct that expands or transforms source code, commands, or templates before or during execution.
- opaque typekind of · An opaque type is a type whose representation and implementation details are hidden from code outside its defining abstraction boundary.
- threaduses · A thread is an independently schedulable sequence or context of execution within a program or process.
This explainer was generated by Manning's knowledge graph from the text of Modern C. The section links point to the parts of the book it draws on.

