How to define a structure with bit field members?
Submitted by: AdministratorYou 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
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
Top Embedded Systems Questions
☺ | Explain What is forward reference w.r.t. pointers in c? |
☺ | Explain What is the difference between embedded systems and the system in which RTOS is running? |
☺ | Explain What happens when recursion functions are declared inline? |
☺ | Explain What are the features different in pSOS and vxWorks? |
☺ | Explain What are different qualifiers in C? |
Top PC Hardware Categories
☺ | Motherboard Interview Questions. |
☺ | Basic Computer Interview Questions. |
☺ | Embedded Systems Interview Questions. |
☺ | A + (Plus) Hardware Interview Questions. |
☺ | Computer Architecture Interview Questions. |