82. Structures-i

Question.1

A developer defines a struct for a communication packet header and expects it to be 7 bytes:

typedef struct {
   uint8_t  start;    // 1 byte
   uint32_t timestamp; // 4 bytes
   uint16_t length;   // 2 bytes
} PacketHeader;

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

On a 32-bit ARM Cortex-M, what does this print?

Need Help? Refer to the Quick Guide below

Select Answer

Restart quiz!