Embedded System Question:
Download Job Interview Questions and Answers PDF
How to define a structure with bit field members?
Answer:
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;
}
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;
}
Download Embedded System Interview Questions And Answers
PDF
Previous Question | Next Question |
Explain What is the difference between embedded systems and the system in which RTOS is running? | Explain What is interrupt latency? |