What is the similarity between a structure, union, and enumeration?
By BYJU'S Exam Prep
Updated on: September 25th, 2023

What is the similarity between a structure, union, and enumeration?
- All of them let you define new values.
- All of them let you define new data types.
- All of them let you define new pointers.
- All of them let you define new structures.
Answer: Option B. All of them let you define new data types.
Table of content
The similarity between a structure, union, and enumeration is that all of them let you define new data types.
Solution
The answer to the question: What is the similarity between a structure, union, and enumeration? All three are used to define the user-defined data types. All the three, i.e., structure, union, and enumeration, can take heterogeneous data as input. The structure uses the keyword struct, union uses the keyword union, and enumeration uses the keyword enum. Options A, C, and D are incorrect regarding structure, union, and enumeration data types.
☛ Related Questions: