옵션 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #include <stdio.h> typedef struct student { char name[5]; int id[5]; int year[5]; int age[5]; }STUDENT; main() { int i; STUDENT std[5]={{"lee",1,1,20},{"park",1,1,21},{"baek",2,1,22},{"bae",3,2,23},{"kim",3,3,24}}; for(i=0;i<5;i++) { printf("Name : %s\nid : %d\nyear : %d\nage : %d\n",std[i].name,std[i].id,std[i].year,std[i].age); } } | cs |