I think the answer return !!(0xAAAAAAAA & x); is for "any-even-one"
for example, 4bit unsigned int 0101 & 0xA(1010) = 0000, after two !! the result is 0, it's incorrect.
if I change 0xAAAAAAAA to 0x55555555, 4bit unsigned int 0101 & 0xA(0101) = 1111, after two !!, the result is 1,it's correct.
it confuse me so long, please help me answer it ,thank u ~
I think the answer
return !!(0xAAAAAAAA & x);is for "any-even-one"for example, 4bit unsigned int 0101 & 0xA(1010) = 0000, after two !! the result is 0, it's incorrect.
if I change 0xAAAAAAAA to 0x55555555, 4bit unsigned int 0101 & 0xA(0101) = 1111, after two !!, the result is 1,it's correct.
it confuse me so long, please help me answer it ,thank u ~