struct porb {char*name; int age; }s[]={"LiHua",18,"WangXin",25,"LiuGuo",21}; #define N(sizeof(s)/sizeof(s[0]))

admin2008-05-04  29

问题 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.name,a.age);
   }

选项

答案LiHua:18 WangXin:25 LiuGuo:21

解析
转载请注明原文地址:https://jikaoti.com/ti/XBtaFFFM
0

最新回复(0)