[填空题] 以下程序的运行结果是______。 # include <string.h> typedef struct student char name[10]; long sno; fl

18 查阅

[填空题] 以下程序的运行结果是______。

# include <string.h>

typedef struct student

char name[10];

long sno;

float score;

STU;

main()

STU a= "Tianjin",2001,95 ,b="Shanghai",2002,90,

c= "Han’gu",2003,95),d,*p=&d;

d=a;

if(strcmp(a.name,c.name)>0) d=c;

if(strcmp(b.name,d.name)>0) d=b;

printf("%1d% s ",d.sno,p->name);

参考答案:

2002Shanghai

计算机考试