Explain Conditional Compilation Directives. How To Use It.
2 years ago
E-Commerce
Conditional Compilation: – Conditional Compilation directives help to compile a specific portion of the program or skip the compilation of some specific part of the program based on some conditions.
Conditional Compilation Directives Are –
Directive Name |
Directive Description |
1) #ifdef |
Return true if the macro is defined. |
2) #ifndef |
Return true if the macro is not defined. |
3) #if |
Test if a compile-time condition is true. |
4) #else |
The alternative for #if |
5) #elif |
#else and #if one statement |
6) #endif |
ends preprocessor conditional |

Rusma Khadka
Dec 27, 2022