Bitwise Operators Questions
Practice Bitwise Operators MCQs with answers and explanations. Page 2 of 2.
Category
C Programming
Topic
Bitwise Operators
Page
2 / 2
Mode
Practice
Questions
Open any question to view the answer and explanation.
Can you perform addition and subtraction using only bitwise operations (e.g., XOR, AND, NOT) without using the + or - operators?
Open
View answer
Using bitwise OR (|) with a mask to set multiple bits in an integer: is this a valid and common technique?
Open
View answer
Clearing (turning off) one or more bits using bitwise AND in conjunction with bitwise NOT: is the pattern x &= ~mask correct?
Open
View answer
Can bitwise OR (|) be used to multiply an integer by powers of 2 (e.g., 2, 4, 8)? Choose the most accurate statement.
Open
View answer
Can “bitwise operations alone” reverse the sign of an integer directly (i.e., make x become -x) without any arithmetic step?
Open
View answer
In C programming, can bitwise operations be used to generate pseudo-random numbers (for example, in xorshift or linear congruential families)? Provide the most accurate statement.
Open
View answer
In C, can the bitwise OR operator (|) be used to set a particular bit of an integer value (for example, set bit k using n | (1 << k))?
Open
View answer
Practice smarter
Solve a few questions daily and revisit weak topics regularly to improve accuracy.