Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: Explain the concept of bit fields in C.
Answer: Bit fields allow the definition of variables that occupy a specific number of bits in a structure, aiding in efficient memory usage.

Example:

struct Flags { unsigned int flag1:1; unsigned int flag2:1; };
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook