C- Bitwise Operators Questions and Answers
Bitwise Operators in C programming are essential for performing operations directly on bits, making them powerful for low-level programming and optimization tasks. These operators are a frequent topic in programming questions and answers for placement exams and technical interviews by companies like Infosys, Wipro, and TCS. This section on C bitwise operators questions with answers explains AND, OR, XOR, NOT, shift operators, and their practical applications. Practicing C programming MCQs on bitwise operations will enhance your problem-solving efficiency and understanding of memory-level computation in C.
C- Bitwise Operators
Showing 10 of
24 questions
12. Which operator is used to check if a particular bit is set?
- OR operator
- AND operator
- XOR operator
- NOT operator
14. How to set a particular bit in C?
- AND with mask
- OR with mask
- XOR with mask
- NOT with mask
16. Which operator has highest precedence among bitwise operators?
- AND (&)
- OR (|)
- XOR (^)
- NOT (~)
18. How to clear a specific bit in C?
- OR with mask
- AND with complement of mask
- XOR with mask
- NOT with mask
20. What does the expression (x >> n) do?
- Multiplies x by 2^n
- Divides x by 2^n
- Adds n to x
- Subtracts n from x