有关结构体的定义,简单
#include<stdio.h>
struct student
{
int xuehao;
char name[30];//写结构体是关于字符的数组长度记得写上
char zhuzhi[30];
float chengji;
}a={001,"lihao","guangdong",100.0};
int main()
{
printf("%d %s %s %.2f\n",a.xuehao,a.name,a.zhuzhi,a.chengji);
return 0;
}