and bitwise operator in C preprocessor

c, c-preprocessor

Solution

Order of operation seems to be the culprit since `==` is evaluated before `&`. Parentheses worked for me:

#if (10 & 10) == 10

Problem

When I try the following code: ``` #if 11 & 10 == 10 #endif ``` the evaluation of expression is true but when I change that to the following: ``` #if 10 & 10 == 10 #endif ``` The evaluation returns false, while based on definition of & operator it should still return true (when I am trying out of preprocessor that's correct). Generally, Whatever I am trying which has 0 in the first operand returns false ignoring what the result is. Does anyone know what the problem is?

Original source