有没有大佬帮我看一下面代码什么地方出错了,初学数据结构的顺序表,想输入score,但每次程序运行都会崩溃,没有error也没有warning,呜呜呜
#include<stdio.h>
typedef struct{
char name[10];
int score;
}student;
typedef struct{
student data[10];
int length;
}sqlist;
int MakeEmpty(sqlist *L){
int i=0;
for(i=0;i<10;i++)
L->data[i].score=0;
L->data[1].score=0;
return;
}
int main()
{
sqlist *L;
int cnt=0;
int count=0;
for(count=0;count<10;count++){
scanf("%d",L->data[count].score);
}
//MakeEmpty(L);
for(cnt=0;cnt<10;cnt++)
printf("%d\n",L->data[cnt].score);
return 0;
}