C Programming - Structures, Unions, Enums - Discussion
Discussion Forum : Structures, Unions, Enums - General Questions (Q.No. 2)
2.
What is the similarity between a structure, union and enumeration?
Discussion:
50 comments Page 3 of 5.
Jiten said:
1 decade 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.
Lokija said:
10 years ago
I can't understand explain clearly.
Sarath said:
10 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.
Pallavi said:
10 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.
Neelima said:
9 years ago
Do the outputs for structure & union is same?
Vishu said:
9 years ago
@Kamal.
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.
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.
Runa said:
2 decades ago
Structures unions and enumeration is used to create a new datatyppe that holds all kinds of datatype that is it includesn a datatype that can hold int, float, char, array inside a user ndefined datatype.
Saravanan said:
1 decade ago
Nice Explanation raju.......
Pradeep bhupathi said:
2 decades ago
Array, pointer, structure, union, enum - These all are user defind data types in c language.
Lokeswari said:
1 decade ago
What is pointer?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers