#include<stdio.h>
#include<stdlib.h>
struct Student
{
int num;
char name[20];
};
int main()
{
struct Student stu[3] = { {1,"ye"},{2,"hu"},{3,"ru"} };
struct Student *p;
printf("No. Name\n");
for (p = stu; p < stu + 3; p++)
{
printf("%5d:%-20s\n", p->num, p->name);
}
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct Person
{
char name[20];
int count;
}leader[3] = { "ye",0,"hu",0,"ji",0 }; //定义初值列表
int main()
{
int i, j;