问题描述
- 设有定义“enum term { my, your=4, his, her=his+10};”
- 设有定义“enum term { my, your=4, his, her=his+10};”,则printf(“%d,%d,%d,%d
”,my, your, his, her);的输出是( )①0,l,2,3 ②0,4,0,10
③0,4,5,15 ④1,4,5,15
解决方案
选③0,4,5,15
解决方案二:
How many persons a human being loved in his or her whole life? who can count ? -It depends on every individual... right? -How many people will miss you when youre gone how many people will be there ......
答案就在这里:How many persons a human being love in his or her whole life
解决方案三:
enum 默认是从零开始的,如果没有赋值就依次加1;
但如果有赋值,就以赋值为准。下一个枚举变量为前一个枚举变量加1.
所以,答案是:3
时间: 2024-11-02 03:10:25