hamburger

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?

  1. All of them let you define new values.
  2. All of them let you define new data types.
  3. All of them let you define new pointers.
  4. All of them let you define new structures.

Answer: Option B. All of them let you define new data types.

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:

Our Apps Playstore
POPULAR EXAMS
SSC and Bank
Other Exams
GradeStack Learning Pvt. Ltd.Windsor IT Park, Tower - A, 2nd Floor, Sector 125, Noida, Uttar Pradesh 201303 help@byjusexamprep.com
Home Practice Test Series Premium