1,习题讲解;
2,结构体:struct student 先声明再定义
struct student //(声明)
{
int num;
char name[10];
float score[2];
}
(1)定义单个:struct student xx[2]={1,"yi",95.5,84.5};
(2)定义数组:struct student xx[2]={1,"yi",95.5,84.5,2,"er",99.6,35.4,};
3,结构体输出形式;
printf ("%d %s %f",xx[i].num,xx[i].name,xx[i].score[0],xx[i].score[1]);