main() { enum team {my,your=4,his,her=his+10}; printf("%d %d %d %d\n",my,your,his,her);}main(){ enum team {my,your=4,his,her=his+10};printf("%d %d %d %d\n",my,your,his,her);} 答案为什么是 0 4 5 15

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/23 10:18:44
main(){enumteam{my,your=4,his,her=his+10};printf("%d%d%d%d\n",my,your,his,her);}main(){enumteam{my,y

main() { enum team {my,your=4,his,her=his+10}; printf("%d %d %d %d\n",my,your,his,her);}main(){ enum team {my,your=4,his,her=his+10};printf("%d %d %d %d\n",my,your,his,her);} 答案为什么是 0 4 5 15
main() { enum team {my,your=4,his,her=his+10}; printf("%d %d %d %d\n",my,your,his,her);}
main()
{ enum team {my,your=4,his,her=his+10};
printf("%d %d %d %d\n",my,your,his,her);}
答案为什么是 0 4 5 15

main() { enum team {my,your=4,his,her=his+10}; printf("%d %d %d %d\n",my,your,his,her);}main(){ enum team {my,your=4,his,her=his+10};printf("%d %d %d %d\n",my,your,his,her);} 答案为什么是 0 4 5 15
my = 0 ( 默认 )
your = 4 (你设定)
his = your + 1 ( your 的下一个,默认+1)
her = his + 10 ( 自然是 5 + 10 = 15 )