为什么我这个没语法错误也没有逻辑错误,却不能正常输出?
#include<stdio.h>struct student
{ int num;
char name[10];
char sex;
char native[10];
float grade;
} stu;
int main()
{char s[10];
printf(" 1 student's number:");scanf("%d",&stu.num);
printf("1 student's name:");scanf("%s",stu.name);
printf("1student's sex:");scanf("%c",&stu.sex);getchar();
printf("1 student's native:");scanf("%s",stu.native);
printf("1 student's grade:");scanf("%f",&stu.grade);
printf("%d,%s,%c,%s,%.2f\n",stu.num,stu.name,stu.sex,stu.native,stu.grade);//就是这不能正常输出stu.sex项
return 0;
}