#include<stdio.h> #include<string.h> struct Student { int id; char name[200]; int age; } ; void f(struct Student *pst) { (*pst).id=003; strcpy(pst->name,"王五"); pst->age=17; } int main(void){ //struct Student st={001,"张三",20}; //st.id=002; //strcpy(st.name,"李四"); //st.age =16; struct Student st; f(&st); printf("%d %s %d",st.id,st.name ,st.age ); }