sex为什么出不来???!!1
#include<stdio.h>#include<string.h>
int main()
{
struct student
{
int num;
char name[7];
char sex;
float score;
}*p,stu;
p = &stu;
stu.num = 1;
stu.sex = 'F';
stu.score = 97;
strcpy(stu.name, "Gongyoo");
printf("No.%d\nSex:%c\nScore:%5.1f\nName:%s\n", stu.num, stu.sex, stu.score, stu.name);
printf("\nNo.%d\nSex:%c\nScore:%5.1f\nName:%s", (*p).num, (*p).sex, (*p).score, (*p).name);
return 0;
}