Preprocessor Directives
Essay Preview: Preprocessor Directives
Report this essay
My Training Period: hours
Abilities
▪ Able to understand and use #include.
▪ Able to understand and use #define.
▪ Able to understand and use macros and inline functions.
▪ Able to understand and use the conditional compilation – #if, #endif, #ifdef, #else,
#ifndef and #undef.
▪ Able to understand and use #error, #pragma, # and ## operators and #line.
▪ Able to display error messages during conditional compilation.
▪ Able to understand and use assertions.
10.1 Introduction
– For C/C++ preprocessor, preprocessing occurs before a program is compiled. A complete process
involved during the preprocessing, compiling and linking can be read in Module W.
– Some possible actions are:
▪ Inclusion of other files in the file being compiled.
▪ Definition of symbolic constants and macros.
▪ Conditional compilation of program code or code segment.
▪ Conditional execution of preprocessor directives.
– All preprocessor directives begin with #, and only white space characters may appear before a
preprocessor directive on a line.
10.2 The #include Preprocessor Directive
– The #include directive causes copy of a specified file to be included in place of the directive. The
two forms of the #include directive are:

Get Your Essay

Cite this page

Conditional Execution Of Preprocessor Directives And Conditional Compilation. (June 24, 2021). Retrieved from https://www.freeessays.education/conditional-execution-of-preprocessor-directives-and-conditional-compilation-essay/