编辑代码

#include <stdio.h>

int main(void) { 
	
	struct student
	{
	int number;
	char name[20];
	char sex;
    } student1={100,"lili",'w'};
    
    struct student *p = &student1;   //直接指向结构体组
    // p = &student1;    
    printf("%d %s %c\n",(*p).number,(*p).name,(*p).sex);
	printf("%d %s %c\n",  p->number,  p->name,  p->sex);
	return 0;
}