ABSTRACT

This chapter discusses preprocessors, which refer to the execution of some statements before actual compilation begins. These statements are included inside a directive called the preprocessor directive. The C programming language has several preprocessor directives, and they are classified into four groups: macros, include files, conditional preprocessors, and other directives. A programmer uses the #define preprocessor that assigns a symbolic name to a constant to write a macro. To include the content of a file in a program, we use a #include preprocessor. Several conditional preprocessor directives are available, such as #if, #else, #endif, #elif, #ifndef, and #ifdef. They are used for assigning conditions, whether to execute a line of code or not. Other directives include preprocessors like #line, #pragma, and #error. The chapter describes everything about these preprocessors and the process of writing them in programs.