C- Bitwise Operators Questions and Answers
Practice ModeShowing 10 of 24 questions
Q21
Which bitwise operator is used for toggling bits?
Answer: Option C
Explanation: XOR toggles bits when mask has 1s
Q22
What is the result of 7 << 2?
Answer: Option D
Explanation: Left shift by 2 multiplies by 4: 7*4=28
Q23
How to check if a number is even using bitwise operators?
Answer: Option A
Explanation: Even numbers have LSB = 0
Q24
What is the output of: printf("%d", 9 & 7);
Answer: Option A
Explanation: 9 (1001) AND 7 (0111) = 1 (0001)