LearnFrenzy
Sign in Take a free test

Data Types · Data Types MCQ · Question 12

What is _BitInt(N) in C23? Answer, explanation & discussion

  • MCQ
  • Hard
  • 0 comments
  • Answer explained
  • Moderated community
Question 12 Back to Exercise

What does unsigned _BitInt(12) x; declare in C23?

  • A An array of 12 bits
  • B A 12-byte integer
  • C An unsigned integer with exactly 12 value bits, which wraps modulo 4096 Correct
  • D A bit-field outside a struct is invalid
Correct Answer: Option C

_BitInt(N) gives integers of an exact bit width – useful for hardware registers, FPGAs and protocols. An unsigned one wraps modulo 2ᴺ; unlike small types, a _BitInt is not promoted to int.

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.

Search LearnFrenzy

Esc

Quick links