这个程序错在哪
struct student{
char name;
int age;
int score;
char sex;
};
void inputstudent(struct student *pstu);
void outputstudent(struct student *pst);
void main()
{
struct student st;
inputstudent(&st);
outputstudent(&st);
}
void inputstudent(struct student *pstu)
{
strcpy(pstu->name,"张三");
pstu->age=18;
pstu->score=148;
pstu->sex='b';
}
void outputstudent(struct student *pst)
{
printf("student1: name %s age %d score %d sex %c\n",pst->name,pst->age,pst->score,pst->sex);
}