C #ifThe #if preprocessor directive evaluates the expression or condition. If condition is true, it executes the code otherwise #elseif or #else or #endif code is executed. Syntax: Syntax with #else: Syntax with #elif and #else: C #if exampleLet's see a simple example to use #if preprocessor directive. Output: Value of Number is: 0 Let's see another example to understand the #if directive clearly. Output: 2 Value of Number is: 1 Next TopicC #else |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India