C语言STRUCT数组 不知道哪错了

#include
int main(void)
{
int i,j;
float temp;
struct Students
{
char num;
char name;
char sex;
char age;
float score;
};
struct Students student[5]=
{
{'0001','一号','男','19',99},
{'0002','二号','女','18',96},
{'0003','三号','女','19',93},
{'0004','四号','男','20',97},
{'0005','五号','男','7',100}
};
for(i=0;i<5;i++)//按成绩排序//
{
for(j=0;j<5-i;j++)
{
if(student[j].score<student[j+1].score)
{
temp=student[j].score;
student[j].score=student[j+1].score;
student[j+1].score=temp;
}
}
}
for(i=0;i<5;i++)
{
printf("%8s",student[i].num);
printf("%12s",student[i].name);
printf("%6s",student[i].sex);
printf("%s",student[i].age);
printf("%d\n",student[i].score);

}
return 0;

}

'0001','一号','男' 是char型吗?
struct Students
{
char *num;
char *name;
char *sex;
char *age;
float score;
};
struct Students student[5]=
{
{"0001","一号","男","19",99},
{"0002","二号","女","18",96},
{"0003","三号","女","19",93},
{"0004","四号","男","20",97},
{"0005","五号","男","7",100}
};

只是对成绩进行了排序,结构体的其他部分没有改变顺序。

'0001','一号','男','19' 的数据类型有问题

你这里只是把成绩排序了,而不是按程序排序
你最后的结果是
'0001','一号','男','19',93
'0002','二号','女','18',96,
'0003','三号','女','19',97,
'0004','四号','男','20',99,
'0005','五号','男','7',100
而不是你预想的排序,排序是交换数组里的学生啊。
另外,你的程序有bug,你的
for(i=0;i<5;i++)//按成绩排序//
{
for(j=0;j<5-i;j++)
if(student[j].score<student[j+1].score)
当i=0, j = [0~4], j + 1= 5,数组越界了,很惊诧居然你的程序完整的run完了,也许当时内存里面的结构在下个位置有一个满足条件的score,但是很诡异,这个数组越界是一个明显的bug

错误太多,不一一列举。请对比正确的代码

int main(void) {
  int i,j;
  struct Students {
    char *num;
    char *name;
    char *sex;
    char *age;
    float score;
  }student[5] = {
   {"0001","一号","男","19",99},
   {"0002","二号","女","18",96},
   {"0003","三号","女","19",93},
   {"0004","四号","男","20",97},
   {"0005","五号","男","7",100}
  };
  struct Students temp;

  /* 按成绩排序 */
  for(i=0;i<5;i++) {
    for(j=0;j<5-i;j++) {
      if(student[j].score<student[j+1].score) {
        temp = student[j];
        student[j] = student[j+1];
        student[j+1] = temp;
      }
    }
  }
  for(i=0;i<5;i++) {
    printf("%8s",student[i].num);
    printf("%12s",student[i].name);
    printf("%6s",student[i].sex);
    printf("%s",student[i].age);
    printf("%d\n",student[i].score);
  }
  return 0;
} 

你把main函数写在结构体后面试试

错误还是挺多的,你首先结构体都在主函数前没有声明