LearnFrenzy
Sign in Take a free test

Bitwise Operators · Bitwise Operators MCQ · Question 11

C23 binary literals and digit separators Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 11 Back to Exercise

In C23, what is the value of 0b0001'0100?

  • A 10100
  • B 20 Correct
  • C 14
  • D A syntax error
Correct Answer: Option B

C23 standardises binary literals (0b) and allows ' as a digit separator, which is ignored by the compiler. 0001 0100 in binary is 16 + 4 = 20.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Popular