Code area
#include<stdio.h>
#include<string.h>
main()
{
struct student
{
long num;
char name[10];
}stu1,*p;
p=&stu1;
stu1.num=100;
strcpy(stu1.name,"jenney"); //此处的赋值方法格外注意
printf("%ld %s\n",(*p).num,(*p).name); //次数用p->num的形式也可!
}
A pointer variable pointing to a structure object can point to either a structure variable or an element of a structure array; the base type of the pointer variable must be the same type as the structure variable