(*p)或者*p,p->num中的p似乎不做检查
程序代码:#include<stdio.h>
#include<string.h>
struct student
{
int num;
char name[20];
char sex;
float score;
};
int main()
{
struct student a;
struct student *p;
p = &a;
a.num = 10101;
strcpy_s(a.name, "Li Lin");
a.sex = 'M';
a.score = 95;
printf("%d %s %c %5.2f\n", (*p).num, (*p).name, (*p).sex, (*p).score);
return 0;
}









