结构体中的赋值问题
# define N 10#include<stdio.h>
typedef char datatype;
int main()
{
typedef struct student
{
datatype name[N];
int score[N];
}stu1;
int i, sum = 0;
stu1={"fh"};
for (i = 0; i<N; i++) {
scanf("%d", &stu1.score[i]);
sum += stu1.score[i];
}
printf("the score of fh is %d", sum);
return 0;
}