Conditional compilation in C programming language: Conditional compilation as the name implies that the code is compiled if certain condition(s) hold true. Normally we use if keyword for checking some condition so we have to use something different so that compiler can determine whether to compile the code or not. The different thing is #if.
Now consider the following code to quickly understand the scenario:
C programming code
#define x 10
printf("hello\n"); // this is compiled as x is defined
printf("bye\n"); // this isn't compiled
Conditional compilation example in C language
#define COMPUTER "An amazing device"