#include<stdio.h> typedef struct student { char name[20]; int age; }STU; void fun(STU *p){ strcpy(p->name, "张三"); p->age=18; //(*p).age=18 } int main(){ STU girl; fun(&girl); printf("name=%s age=%d\n", girl.name,girl.age); return 0; }