In C programming, why would you use an enumeration (enum)?
- To create multi-dimensional arrays
- To define a set of named integer constants
- To perform arithmetic operations
- To store floating-point numbers
Enumerations (enums) in C are used to define a set of named integer constants, making your code more readable and self-explanatory.
Loading...
Related Quiz
- What is the significance of using pointers to functions in C?
- How can you redirect error messages in a C program to a file instead of displaying them on the console?
- In C, the function ________ is used to allocate memory for an array of elements and initialize them to zero.
- The size of a structure in memory is determined by the ________ of its members.
- You're working on an application that processes large datasets. Why might you choose to use pointers to arrays instead of traditional arrays?