Preprocessor is the part of the compiler that processes a C program before its compilation. In this chapter, we’ll discuss how to define and use macros in a C program and then we’ll present preprocessor directives that support the conditional compilation of a C program.
In previous chapters, we have used the #define directive to define a simple macro, which is a symbolic name associated with a constant value. To define a simple macro, we write
#define macro_name replacement_characters
Typically, most programmers choose capital letters to name a macro in order to distinguish them from program variables. The usual practice is to define all macros with global scope at the top of the program, ...