C语言知识形成性考试-四.docVIP

  • 2
  • 0
  • 约5.13千字
  • 约 11页
  • 2019-10-20 发布于安徽
  • 举报
-+ 一、选择题(共30分,每小题2分) 题目1 题干 假定有“struct BOOK{char title[40]; float price;}; struct BOOK book;”,则不正确的语句为(??? )。 选择一项: a. struct BOOK *x=malloc(book); b. struct BOOK x={C++ Programming,27.0}; c. struct BOOK *x=malloc(sizeof(struct BOOK)); d. struct BOOK *x=book; 题目2 题干 假定有“struct BOOK{char title[40]; float price;} book;”,则正确的语句为(??? )。 选择一项: a. struct BOOK x= book; b. struct BOOK *x=book; c. struct BOOK x=calloc(BOOK); d. struct BOOK *x=BOOK; 题目3 题干 在结构类型的定义中,不同数据成员的定义项之间采用的分隔符是(??? )。 选择一项: a. 句点 b. 冒号 c. 分号 d. 逗号 题目4 题干 假定一个结构类型的定义为 “struct A{int a,b; double c;};”,则该类型的长度为(??? )。 选择一项: a. 8 b.

文档评论(0)

1亿VIP精品文档

相关文档