c - problem in boolean expression with if statement -
i need confirmation. correct o/p told me following expression not work
thanks in advance.
#define 11 #define b 12 #define c 13 // want if array[i] has values of of these if( array[i] == (a) ||(b) ||( c)) // function else printf("no match");
replace code this:
if( array[i] == || array[i] == b || array[i] == c)
each part of boolean condition must complete expression. while wrote valid c code, doesn't achieve want: need make array element comparison in every part.
Comments
Post a Comment