#include <stdio.h>
struct Student
{ int num;
char name[20];
int score; };
struct Student stu[3]={ {10101,"Li Lin", 78}, {10102,"Zhang Fun",98}, {10104,"Wang Min",74} };
int main()
{ struct Student *p; //
printf(" No. Name score\n");
for(p=stu;p<stu+3;p++) //利用指针 结构体成员输出信息
printf(“%5d %-20s %4d\n”,
p->num, p->name, p->score);
return 0; }