Preprocessor Directives in C Language
- C Preprocessor (in short cpp) is the macro preprocessor (a separate program) which is invoked by the C Compiler before processing any other element in the program i.e. C Preprocessors are the first part of the translation during the processing (Compilation) of a C Program.
- To include the various instructions to the compiler in the C source code,some directives are used called as Preprocessor Directives.
- Each preprocessor directive have different task which executes just before the actual execution of C program which makes the program more portable.
- C Preprocessor directives are used only to instruct compilers.
- In c all the preprocessor directives start with # characterexcept define() operator.
Types of Preprocessor Directives in C Language
FILE INCLUSIVE DIRECTIVE #include MACRO SUBSTITUTION DIRECTIVE #define UNDEFINE SYMBOL DIRECTIVE #undef CONDITIONAL DIRECTIVE # if #elif #else #endif #ifdef #ifndef MISCELLANEOUS DIRECTIVE #pragma #line #error OPERATOR IN PREPROCESSOR #,##,define()
- Spaces or tabs are permitted between the # and directive name (such as inculde,define etc), but no any escape characters or other symbols are permitted. The preprocessor removes white space and concatenates the # and directive name together.
Each Preprocessor Directive would be explained in next posts of C Programming Language.
- Preprocessor in C Language – Introduction of C Preprocessor & its advantages
- Introduction of C Compiler – Download Turbo C/C++ Compiler for 64 bit Windows
- [How To] Compile & Execute a C/C++ Program – C Programming Basics
- List of Top 5 C Compilers – TC, GCC, Borland C++, MS Visual C++ & Intel C++ Studio
- C Programming Language – History and Introduction of C Language
- Advantages & Disadvantages of C Language: C Programming Features
- [Fixed] How To Fix USB Mouse Not Recognized Error In PC/Laptop
- YouTube Partners Meet 2013 – Register Free Online Today