Answers

Question and Answer:

  Home  Embedded System

⟩ How to define a structure with bit field members?

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;

}

 136 views

More Questions for you: