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 139 views
1 answer 125 views
1 answer 141 views
1 answer 133 views
1 answer 248 views
1 answer 131 views
131 views asked Aug 23, 2016 by avibootz
...