#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;}
這個(gè)程序到底怎么了 運(yùn)行不了 能幫幫忙嗎?
熊熊熊熊
2016-03-27 16:38:27