tags:

views:

72

answers:

1

difference between enumerated and structure.

+4  A: 

Well, there's a big difference.

Enumerations do not have members or attributes.

Structures do not define lists of constants. A structure can contain enumerations, but an enumeration cannot contain structures.

A structure:

struct Test {
    int a;
    float b;
    char c;
};

An enumeration (enum):

enum fruits {
    APPLE,
    ORANGE = 3,
    PEAR
};

Is this an interview question?

Thomas O
Sounds to me like someone was asleep in their first class of C Programming 101.
Donal Fellows
what, is that directed at me? I have never taken a programming course.
Thomas O