66. Pointer-iv

Question.2

A developer configures a UART peripheral via a pointer to a struct:

typedef struct {
   uint32_t baud;
   uint8_t parity;
} UART_Config;

UART_Config cfg = {9600, 1};
UART_Config *ptr = &cfg;
ptr.baud = 115200;

What is wrong?

Need Help? Refer to the Quick Guide below

Select Answer

Restart quiz!