struct porb {char*name; int age; }s[]={'LiHua',18,'WangXin',25,'LiuGuo',21}; define N(sizeof(s)/sizeof(s[0])) void f(struct porb a[],int n); main() { f(s,N); } void f(struct porb a[],int n) { int i; for(i=0;i<n;i++) printf('%s:d/n',a[i].name,a[i].age); }