第七章结构型、共同型和枚举型.docVIP

  • 9
  • 0
  • 约9.79千字
  • 约 9页
  • 2017-12-31 发布于天津
  • 举报
第七章结构型、共同型和枚举型.doc

第七章 结构型、共同型和枚举型 一、单项选择题 1.放100年学生的数据,包括学号,姓名,成绩。在如下的定义中,不正确的是( B )。 A. struct student { int sno; char name[20]; float score } stu[100]; B. struct student stu[100] { int sno; char name[20]; float score }; C. struct { int sno; char name[20]; float score } stu[100]; D. struct student { int sno; char name[20]; float score }; struct student stu[100]; 2.设有定义语句struct { int x; int y; } d[2]={{1,3},{2,7}}; 则printf(“%d\n”,d[0].y/d[0].x*d[1].x);的输出是( D )。 A.0 B.1 C.3 D.6 3.设有定义语句enum team {my, your=4, his, her=his+10}; 则printf(“%d,%d,%d,%d\n”,my, your, his, her);的输出是( D )。 A.0,1,2,3 B.0,4,

文档评论(0)

1亿VIP精品文档

相关文档