正在加载图片...
511结构体的引出及使用 例5-1输入三个学生的信息,并输出。 #include <stdio. h> void main( 定义学生的结构体类型 &struct student int num char name 101 char sex. int age: int score 定义3个结构体类型的变量, char institute 20] 用来存放3个学生的信息 struct student sl, S2, S35.1.1 结构体的引出及使用 例5-1 输入三个学生的信息,并输出。 #include <stdio.h> void main( ) { struct student { int num ; char name[10] ; char sex; int age; int score ; char institute[20] }; struct student s1, s2, s3; 定义学生的结构体类型 定义3个结构体类型的变量, 用来存放3个学生的信息
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有