What is the difference between structure and enum?.

2 replies · 3K views · last reply
sam topper.
Messages
14
Reaction score
0
or else what is the difference between structure,union and enum.
can anyone please provide the exact information about them.
 
Last edited by a moderator:
sam topper. said:
or else what is the difference between structure,union and enum.
can anyone please provide the exact information about them.

What research have you done on your own? What do you know about them so far? Definitions are not hard to find.
 
Last edited by a moderator:
structures allocate separate memory for all the fields specified
unions allocate memory equal to the largest datatype specified and all the fields reference the same space.
enums are just aliases for integers that are more organized and convenient than using #DEFINE
 
  • Like
Likes   Reactions: 1 person