结构 联合和枚举.pptxVIP

  • 0
  • 0
  • 约1.95千字
  • 约 21页
  • 2020-04-24 发布于上海
  • 举报
9.1 结构体类型 一、结构的定义 ;例2:定义一个结构体struct student类型 struct student { int num; /* 学号 */ char name[20]; /* 姓名 */ char sex; /* 性别 */ int age; /* 年龄 */ float score; /* 成绩 */ char addr[30]; /* 地址 */ };; 二、结构体变量的定义 ; 第9章 结构体;图1 结构体变量的存储情况; 例4: struct student { int num; /* 学号 */ char name[20]; /* 姓名 */ char sex; /* 性别 */ int age; /* 年龄 */ char addr[30]; /* 地址 */ }student1, student2 ; ; 例5: struct {

文档评论(0)

1亿VIP精品文档

相关文档