- 5
- 0
- 约3.83千字
- 约 30页
- 2017-04-28 发布于四川
- 举报
第五章结构体与共用体
第5章 结构体与共用体;*;*;struct student
{ int num;
char name[20];
char sex;
int age;
float score;
char address[50];
};;先声明结构体类型再定义结构体变量
struct student
{ int num;
char name[20];
char sex;
int age;
float score;
char address[50];
};
struct student stu1,stu2;
;声明结构体类型的同时定义结构体变量
struct student
{ int num;
char name[20];
char sex;
int age;
float score;
char address[50];
}stu1,stu2;
;直接定义结构体变量
struct
{ int num;
char name[20];
char sex;
int age;
float score;
char address[50];
} stu1,stu2;
;说明:
类型与变量名是不同的概念;
对结构体的成员的使用与普通变量类似;
结构体的成员也可以是另一个结构体;
struct student
{ int n
您可能关注的文档
最近下载
- 2025金融业智能风控实践白皮书.pdf VIP
- 弱电解质电离平衡习题与.pdf VIP
- ISO 2063-1_2019 中文版(金属和其他无机涂层 热喷涂锌铝及其合金 第 1 部分:防腐蚀设计要求).docx VIP
- 自考英语二高频词汇.pdf VIP
- 2025-2026学年辽宁省东北育才学校高三上学期10月联考物理试题及答案.pdf VIP
- 《中国文化概况》带翻译版.pdf VIP
- 《HY/T 0187.1-2024海水循环冷却系统设计规范 第1部分:取水技术要求》.pdf
- 路灯照明系统施工组织设计.docx
- 人工智能导论(第2版)第十一章-行为智能(机器人).pptx
- 川菜推广活动策划方案.pptx VIP
原创力文档

文档评论(0)