Interview Questions

Which bit wise operator is suitable for turning off a particular bit in a number?

C Interview Questions and Answers


(Continued from previous question...)

Which bit wise operator is suitable for turning off a particular bit in a number?

The bitwise AND operator, again. In the following code snippet, the bit number 24 is reset to zero.
some_int = some_int & ~KBit24;

(Continued on next question...)

Other Interview Questions