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 152 views
1 answer 147 views
1 answer 159 views
1 answer 148 views
1 answer 264 views
1 answer 144 views
144 views asked Aug 23, 2016 by avibootz
...