阅读下列程序段,写出运行结果 ________ 。 struct user_info { charname[20]; int age; charphone[20]; charaddress[80]; }; typedef struct user_infoUSERINFO; inti,j,k; USERINFOtmp; USERINFOuser[5]= { {"Li",31,"62201100","Beijing"}, {"Wang",29,"12347899","Xi an"}, {"Anqi",20,"76769892","Shanghai"}, {"Zhang",46,"87432234","Tianjin"}, {"Yang",33,"87651234","Shenyang"} }; for(i=1;i<5;i++) { k=5-i; for(j=0;j<5-i;j++) if(stricmp(user[j].name,user[k].name)>0) k=j; if(k!=5-i) { tmp=user[k]; user[k]=user[5-i]; user[5-i]=tmp; } } for(i=0;i<5;i++) printf("%s",user[i].name);
阅读下列程序段,写出运行结果 ________ 。 struct user_info { charname[20]; int age; charphone[20]; charaddress[80]; }; typedef struct user_infoUSERINFO; inti,j,k; USERINFOtmp; USERINFOuser[5]= { {"Li",31,"62201100","Beijing"}, {"Wang",29,"12347899","Xi an"}, {"Anqi",20,"76769892","Shanghai"}, {"Zhang",46,"87432234","Tianjin"}, {"Yang",33,"87651234","Shenyang"} }; for(i=1;i<5;i++) { k=5-i; for(j=0;j<5-i;j++) if(stricmp(user[j].name,user[k].name)>0) k=j; if(k!=5-i) { tmp=user[k]; user[k]=user[5-i]; user[5-i]=tmp; } } for(i=0;i<5;i++) printf("%s",user[i].name);
1