How to use #if conditional evaluation in C

1 Answer

0 votes
#include <stdio.h>
 
#define VAL 3
 
int main(void)
{
    #if !defined(VALLLL) && (VAL < 10 * 3)
        printf("yes < 10 * 3\n");
    #endif
    
    return 0;
}

 
/*
run:

yes < 10 * 3

*/

 



answered Aug 23, 2016 by avibootz

Related questions

1 answer 150 views
1 answer 142 views
1 answer 147 views
1 answer 141 views
1 answer 259 views
1 answer 137 views
137 views asked Aug 23, 2016 by avibootz
...