标签:c语言
#include<stdio.h>
void main()
{ struct person
{char name[20];
char sex;
int age;
float height;
}per[3]={{"Li Ping",‘M‘,20,175},{"Wang Ling",‘F‘,19,162.5},
{"Zhao Hui",‘M‘,20,178}};
struct person *p;
for(p=per;p<per+3;p++)
printf("%-18s%3c%4d%7.1f\n",p->name,p->sex,p->age,p->height);
}
本文出自 “努力奋斗,互相提高” 博客,请务必保留此出处http://c10086.blog.51cto.com/6433044/1413756
编程题:指针变量指向结构体数组。,布布扣,bubuko.com
标签:c语言
原文地址:http://c10086.blog.51cto.com/6433044/1413756