83. Structures-ii

Question.2

A developer defines a struct with bitfields:

typedef struct {
   uint8_t flag1 : 1;
   uint8_t flag2 : 1;
   uint8_t mode  : 3;
   uint8_t       : 3;  // reserved
} StatusByte;

printf("%lu", sizeof(StatusByte));

What does this print?

Need Help? Refer to the Quick Guide below

Select Answer

Restart quiz!