How does Enum allocate Memory on C?

前端 未结 3 601
渐次进展
渐次进展 2020-12-18 03:58

I\'m trying to work with C and Assembly (intelx8086) lenguage.

I\'m also using one class a friend of mine gave me that has a

typedef enum data_10 {a=         


        
3条回答
  •  -上瘾入骨i
    2020-12-18 04:46

    Although it may vary from compiler to compiler, enum typically takes the same size as an int. To be sure, though, you can always use sizeof( data_10_type );

提交回复
热议问题