简答题
写出以下程序段的输出结果________。struct st{ int x,*y;}*p;int s[]={1,2,3,4};struct sta[]={1,&s[0],2,&s[1],3,&s[2],4,&s[3]};p=a;printf("%d\n",++(*(++p)->y));
简答题
阅读下列程序段,写出运行结果________。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);
简答题
阅读下列程序,写出运行结果________。#include#includetypedef struct { charname[9];char sex;float score[2];}STU;STU f(STU a){STU b={"Zhao",'m',85.0,90.0};int i;strcpy(a.name,b.name);a.sex =b.sex ;for(i=0;i<2;i++) a.score[i]=b.score[i];return a;}int main(){STU c={"Qian",'f',95.0,92.0},d;d=f(c);printf("%s,%c,%2.0f,%2.0f\n",d.name ,d.sex ,d.score[0],d.score[1]);return 0;}
套餐购买该问题答案仅对会员开放,欢迎开通会员 ¥ 19.9
0.64/天
1个月(不限次)
¥ 19.9
1000次
(不限时)
¥ 29.9
0.32/天
3个月(不限次)
¥ 59.9
0.16/天
1年(不限次)
立即支付