以下程序的输出结果是 ( )  enum weekday {sun=7,mon=1,tue,wed,thu,fri,sat};  main( )  { enum weekday workday,week_end;   int i,a [8]; 

admin2009-04-15  16

问题 以下程序的输出结果是    (  )  enum weekday {sun=7,mon=1,tue,wed,thu,fri,sat};  main(  )  { enum weekday workday,week_end;   int i,a  [8];   workday=tue;   week  end=sun;   pritnf("\ntuesday=%d sunday=%d", wotkday, week_end);   workday=sun+tue;   week_end=(enum weekday)3;   printf  ("tuesday=%d sunday=%d", workday week_end);   a[sun]=sun;   a[mon]=mon   a[tue]=tue;   a[wed]=wed;   a[thu]=thu;   a[fri]=fr;   a[sat]=sat;   for(i=1;i<7;i+ +) printf("%d",a );  }

选项 A、tuesday=2 sunday=7;tuesday=2 sunday=7;1 2 3 4 5 6 7
B、tuesday=2 sunday=7;tuesday=9 sunday=3;1 2 3 4 5 6 7
C、tuesday=0 sunday=7;tuesday=2 sunday=3;1 2 3 4 5 6 7
D、tuesday=1 sunday=2;tuesday=3 sunday=4;1 2 3 4 5 6 7

答案2

解析
转载请注明原文地址:https://kaotiyun.com/show/fzWp777K
0

相关试题推荐
随机试题
最新回复(0)