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?
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
Explanation:
No answer description is available. Let's discuss.
Discussion:
49 comments Page 5 of 5.

Devi said:   1 decade ago
Thanks for your explanation.

Nagarjun said:   1 decade ago
S.I agree vtt the Lips .but Enumrated gives the different states of a variable
example;
Enum person
{
male,fmale;
}
where the person having 2 states male r female;

Surya said:   1 decade ago
These are used to create a new data type that holds all data types.

Lipsa said:   1 decade ago
I agree with the runa and the main difference is the structure allocate different memory location with the data types but union allocate one large memory location for their members.

Varun said:   1 decade ago
But what is the difference?

Yamuna said:   1 decade ago
Since Structure,Union,Enum are all User defined data types so user can use new values...thus logic is simple.. :-)

Lokeswari said:   1 decade ago
What is pointer?

Pradeep bhupathi said:   1 decade ago
Array, pointer, structure, union, enum - These all are user defind data types in c language.

Runa said:   1 decade 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.


Post your comments here:

Your comments will be displayed after verification.