// struct 1 #include "stdio.h" #include "stdlib.h" #include "string.h" #define N 15 #define P 2 struct score { char sid[N]; int hw1; int hw2; int lin; } s[P]={{"s181205043101",99,80,58},{"s181205043102",99,0,48}} ; int main(){ int i; for (i=0; i
sid, &(p+i)->hw1, &(p+i)->hw2, &(p+i)->lin ); } /* printf(" pls input number "); scanf ("%d", &i); */ for ( ){ printf(" number %d : %s %d %d %d\n", i, (p+i-1)->sid, (p+i-1)->hw1, (p+i-1)->hw2, (p+i-1)->lin ); } return 0; }