Created: 2023-01-10 15:16
Status: #concept
Subject: Programming
Tags: C Compiling Preprocessor
Directives
They are editing commands that modify the program prior to compilation.
Before a C program is compiled, it is passed into the Preprocessor. Commands intended for the preprocessor to execute in the Preprocessing stage are called DIRECTIVES.
#include <stdio.h>
/* This directive states that information in <stdio.h> is to be "included"
into the program before it is compiled */
-
Directives always begin with a
#
character, which distinguishes them from other items in a C program. -
They are 1-line-long, with no semicolon
;
at the end.
The .h
suffix indicates that it is a header inside C’s standard library.
References
C Programming, A Modern Approach, 2nd Edition, Chapter 2.2