Microsoft Interview Question
Software Engineer / Developerswhenever you are using MACRO in C, we should take full care of operator's precedence rule. Therefore, I think the answer is like below;
#define EXCLUSIVE_OR(A,B) ( ( (A) & ~(B) ) | ~(A) & (B) ) )
(A OR B) AND (!A OR !B)
- paleo January 07, 2007