Home > Article > Backend Development > C preprocessor?
The C programming language supports preprocessors in order to work the program efficiently. C preprocessor is a macro preprocessor for C-based programming languages. The preprocessor provides the compiler with the ability to include header files, macro expansion, conditional compilation, and line control in an explicit manner.
#hash tag is used to define preprocessors, that is, all preprocessors start with #. This is followed by the name of the preprocessor without any spaces. Here is a list of C preprocessors.
S.No. | Preprocessor | Description |
---|---|---|
1. | #include
| Include specific header files from a file. |
2. | #define
| Define preprocessor macros. |
3. | #undef
| Undefine preprocessor macro |
4. | #if
| Checks the compile-time condition and evaluates to True value. |
5. | #else
| Evaluate as an alternative to if preprocessor . |
6. | #ifndef
| Checks whether the macro is defined. If undefined, evaluates to TRUE . |
7. | #elif
| Simultaneously combine #if and #else statements. |
8. | #error
| Defined by stderr method Printed error message. |
9. | #endif
| End preprocessor condition. |
10. | #pragma
| Used to issue commands to the compiler/ |
The above is the detailed content of C preprocessor?. For more information, please follow other related articles on the PHP Chinese website!