C Programming - Structures, Unions, Enums - Discussion

Discussion Forum : Structures, Unions, Enums - General Questions (Q.No. 2)
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
No answer description is available. Let's discuss.
49 comments Page 1 of 5.

Keerthana said:   6 years ago
All are user-defined datatypes which allow the user to create their own datatype which can be a combination of int, float, char, etc.

Bhushan shriram said:   6 years ago
Please, explain about union?

Rekha said:   7 years ago
Which is better to use structure or union? Any one explain in detail.

Vishu said:   7 years ago

Linked list: list is a collection of elements. There are 2 ways of maintaining list in computer memory. The first way is to take an array for sorting elements of the list. But arrays have some disadvantage. Insertion and deletion of the element require more processing. The second way is implementing a list in a memory by using a self-referential structure.

Neelima said:   8 years ago
Do the outputs for structure & union is same?

Sonali Adhav said:   8 years ago

Are the user defined or secondary types of data type in C?

Pallavi said:   8 years ago
Structure mean collection of multiple element that can be of different data types. Definition of union is same of structure but only data element is stored in union variable.

Sarath said:   9 years ago
Because the secondary data types are arrays, pointers, structures, union and enum, they are user defined data types All of them let you define new data types.

Lokija said:   9 years ago
I can't understand explain clearly.

Jiten said:   9 years ago
Structure are user define data types in which you can store more than one data type variable. It is similar to union. But in union you can access only one value at a time because in union memory allocated to only one member at a time. While in structure all of its member have its own memory. That's why structure is taking more memory then union.

Post your comments here:

Your comments will be displayed after verification.