回复 楼主 Jeff_
#include <stdio.h>#include <string.h>
struct stud{
char name[10];
int score[2];
} *p;
main ()
{
char *s[4] = { "ABCD", "12", "EFGH", "34" };
int i = 0 ;
struct stud t[4]= {{"Lisa",98,97},{"Tom",89,86},
{"John",68,79},{"Lili",94,90}};
while( *s[1] != '\0' ){
printf("%s\n", s[i]+strlen(s[1])-1);
s[1]++;
i +=2;
}
p=t+2;
printf("%s, %d\n ",t[0].name,t[0].name,t[0].score[0]+t[0].score[1]);
printf("%s, %d\n ",p->name,p->score[0] + p->score[1]);
}
第一,第二行分别输出什么