Using the #include Statement

Surprisingly, you'll never see #include in a list of C commands because #include is not a C command. Statements in a C program that begin with the pound sign are called preprocessor directives . The compiler analyzes the directive and, instead of com piling the statement, acts upon the statement immediately during compilation.

The #include preprocessor directive tells the compiler to insert another file that resides in source code form at the location in the program where the directive resides. Therefore, before the program is actually compiled, more code is inserted at the programmer's request at the place where #include occurs. That code is compiled along with the pro grammer's code.

The stdio.h file is a source ...

Get Absolute Beginner's Guide to Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.