C- Bitwise Operators Questions and Answers

Take Exam

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

11. What is the value of 1 << 3?

  • 1
  • 3
  • 6
  • 8
Show Answer Report

12. Which operator is used to check if a particular bit is set?

  • OR operator
  • AND operator
  • XOR operator
  • NOT operator
Show Answer Report

13. What is the output of: printf("%d", 15 ^ 7);

  • 8
  • 15
  • 7
  • 22
Show Answer Report

14. How to set a particular bit in C?

  • AND with mask
  • OR with mask
  • XOR with mask
  • NOT with mask
Show Answer Report

15. What is the result of 16 >> 2?

  • 16
  • 8
  • 4
  • 2
Show Answer Report

16. Which operator has highest precedence among bitwise operators?

  • AND (&)
  • OR (|)
  • XOR (^)
  • NOT (~)
Show Answer Report

17. What is the output of: printf("%d", ~5);

  • 5
  • -6
  • 6
  • -5
Show Answer Report

18. How to clear a specific bit in C?

  • OR with mask
  • AND with complement of mask
  • XOR with mask
  • NOT with mask
Show Answer Report

19. What is the value of 12 & 10?

  • 12
  • 10
  • 8
  • 14
Show Answer Report

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
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test