#include<stdio.h>
#include<string.h>
int main()
{
struct student
{
long nu;
char name[10];
int age;
};
struct student stu_i;
struct student*p;
p=&stu_i;
stu_1.nu =201601;
stu_1.age =12;
strcpy(stu_1.name ,"xiong");
stu_2.nu =201602;
stu_2.age =15;
strcpy(stu_2.name ,"xiong");
stu_3.nu =201603;
stu_3.age =20;
strcpy(stu_3.name ,"tong");
stu_4.nu =201604;
stu_4.age =21;
strcpy(stu_4.name ,"zeng");
stu_5.nu =201605;
stu_5.age =19;
strcpy(stu_5.name ,"mao");
int i;
i=0;
for(i=0;i<5;i++)
{
printf("number is :%d\nname is:%s\nage is:%d\n",(*p).nu,(*p).name,(*p).age);
}
return 0;
}
leic
乱舞的旋律
guozhchun
相关分类