The #if directive can be used to test the conditions
or expressions. If the expression or conditions is true than it returns 0
(zero) other wise it return nonzero value and execution will go to next step or
statement like as #else, #elif or #endif.
Syntax:
#if condition_1
statement_1;
……………….
statement_N;
#else
statement_1;
……………….
statement_N;
#endif
Ex:
#if A > B
#define
MAX A
#else
#define
MAX B
#endif
No comments:
Post a Comment