#include<stdio.h>編程
void main()數組
{ struct personide
{char name[20];ui
char sex;spa
int age;指針
float height;orm
}per[3]={{"Li Ping",'M',20,175},{"Wang Ling",'F',19,162.5},it
{"Zhao Hui",'M',20,178}};io
struct person *p;class
for(p=per;p<per+3;p++)
printf("%-18s%3c%4d%7.1f\n",p->name,p->sex,p->age,p->height);
}