16. Bitwise Operations-III

Question.3

A developer checks whether both bit 0 and bit 7 are set in a flags register. He writes:

if (flags & 0x01 && flags & 0x80) {

Another developer suggests replacing && with &. Would the logic remain the same?

Need Help? Refer to the Quick Guide below

Select Answer

Restart quiz!