Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardC#struct memory layoutSingle-choice MCQ

Given the struct below, what is its size with `[StructLayout(LayoutKind.Sequential)]` on a 64-bit runtime, and why?

[StructLayout(LayoutKind.Sequential)] struct S { byte a; // 1 byte long b; // 8 bytes byte c; // 1 byte }