8. References

Question.6

A developer tries to create a reference to a bitfield in a register struct:

struct UART_Status {
   uint8_t tx_ready : 1;
   uint8_t rx_ready : 1;
   uint8_t error    : 1;
   uint8_t reserved : 5;
};

UART_Status status;
uint8_t &tx = status.tx_ready;  // Reference to bitfield

Will this compile?

Need Help? Refer to the Quick Guide below

Select Answer

Restart quiz!