#include <stdio.h>
#include <stdlib.h>
struct student{
int score;
char name[128];
};
int main()
{
struct student stu1;
stu1.score = 98;
strcpy(stu1.name,“yrx”);
printf(“score = %d,name = %s”,stu1.score,stu1.name);
printf("\n");
struct student *p;
p = (struct student *)malloc(sizeof(struct student));
p->score = 77;
strcpy(p->name,“zzz”);
printf(“score = %d,name = %s”,p->score,p->name);
return 0;
}在这里插入图片描述