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
2010-10-03 19:44:56
Sounds to me like someone was asleep in their first class of C Programming 101.
Donal Fellows
2010-10-03 19:46:55
what, is that directed at me? I have never taken a programming course.
Thomas O
2010-10-03 19:47:31