What is a key characteristic of a union in C?
- Allows multiple data types in a single memory location
- Automatically allocates memory on the stack
- Only works with integers
- Provides dynamic memory allocation
A union in C allows you to store different data types in a single memory location, and it's a crucial feature for creating composite data types.
Loading...
Related Quiz
- How can function pointers be used to implement callbacks in C?
- Using the ________ keyword before a function suggests to the compiler that the function should be expanded at the point where it is called.
- What will happen if the condition in a 'while' loop is initially false?
- You are developing an interactive application that continuously accepts user input until the user decides to exit. Which loop construct would be most appropriate for this scenario?
- How can you determine the size of an array in C?