0
Can someone describe the bitwise operator (&) in a for loop? Like: int bitNum=0b01010101;for (i=0b00000000; i &bitNum; i++)
1 Resposta
+ 1
Your for loop is invalid. there should be a condition after initialising and after 1st semicolon. Also & operator returns 0 if inputs are both 0 or (0,1) or (1,0) and returns 1 only if both values are 1. That's why the condition you put i &bitNum is plain wrong and moreover if it was a statement the answer would be 0b00000000 or 0x00