C programming language supports preprocessors for efficient working of its program. C Preprocessor is a macro preprocessor for C based programming language. A preprocessor gives the compiler an ability for including header files, macro expansions, conditional compilation and line control in an explicit way.
The # hash tag is used to define a preprocessor i.e. all preprocessors have # in starting. Followed by the name of the preprocessor without any space in between. Here, is a list C preprocessors.
| S.No. | Preprocessor | Description |
|---|---|---|
| 1. | #include | Includes a specific header from the files. |
| 2. | #define | Defines a preprocessor macro. |
| 3. | #undef | Undefine a preprocessor macro |
| 4. | #if | Checks for a compile time condition and evaluates for True value. |
| 5. | #else | Evaluate as alternative of the if preprocessor. |
| 6. | #ifndef | Checks if the macros is defined. Evaluates to TRUE if not defined. |
| 7. | #elif | Combination of both #if and #else statement. |
| 8. | #error | Defines error message print by stderr method. |
| 9. | #endif | ends preprocessor condition. |
| 10. | #pragma | Used to give commands to compiler/ |