How to define a structure with bit field members?

Submitted by: Administrator
You can define structure bit field members with Dot operators.

EXAMPLE:

#include <stdio.h>
int main()
{

Struct bit_field
{
Int x.4; // it allocates only 4 bits to x
Char C.6; // it allocates only 6 bits to C;
};

return 0;
}
Submitted by: Administrator

Read Online Embedded Systems Job Interview Questions And Answers