How is the size of a union determined in C?
- By the number of members
- By the size of its largest member
- By the size of its smallest member
- By the sum of the sizes of its members
In C, the size of a union is determined by the size of its largest member. If you have a union with multiple members, the size will be at least as large as the largest member's size.
Loading...
Related Quiz
- What is the primary purpose of using pointers in a C function?
- What is a variable declared within a block or a function known as?
- When defining a structure in C, memory is not allocated until an ________ of the structure is created.
- When defining a structure in C, which keyword is used?
- You are tasked with developing a program that logs error messages to a file. Which file handling functions would be most appropriate to use?