The structure is a user-defined data type that is a collection of dissimilar data types. Enum is to define a collection of options available . 3. A struct can contain both data variables and methods. Enum can only contain data types.
Read moreWhat is the similarity between enum union and structure *?
2) 2. What is the similarity between a structure, union and enumeration? 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.
Read moreWhat is union and structure in C++?
A union is like a struct in that it generally has several fields, all of which are public by default. Unlike a struct, however, only one of the fields is used at any given time. In other words, it is a structure that allows the same storage space to be used to store values of different data types at different times.
Read more