Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
C++
/
C structs, unions and enums
Which statement about sizeof(struct Record) is portable C?
from C structs, unions and enums
C23 (GCC 13.3.0)
intermediate
1 min
Which statement about sizeof(struct Record) is portable C?
It includes any internal and tail padding chosen for that implementation.
It always equals the sum of sizeof for every member.
It is identical across compilers whenever member declarations match.
It excludes bytes needed to align adjacent array elements.
Check
Ask AI about this kata
Report an error
previous kata
Spot the bug in the tagged union
Spot the bug
next kata
What must a program track when a union represents several alternative payloads?
Quiz
A new version is available
Reload