题目内容 (请给出正确答案)
[单选题]

以下程序的运行结果是 typedef struct { char name[9]; float score; }STU; STU fun(); }

A.Zhao,60,Li,50

B.Sun,70,Li,50

C.Zhao,60,Qian,40

D.Sun,70,Qian,40

提问人:网友lixin080108 发布时间:2022-01-07
参考答案
查看官方参考答案
如搜索结果不匹配,请 联系老师 获取答案
网友答案
查看全部
  • · 有5位网友选择 B,占比55.56%
  • · 有4位网友选择 C,占比44.44%
匿名网友 选择了C
[205.***.***.81] 1天前
匿名网友 选择了B
[187.***.***.135] 1天前
匿名网友 选择了C
[188.***.***.154] 1天前
匿名网友 选择了B
[245.***.***.0] 1天前
匿名网友 选择了C
[13.***.***.45] 1天前
匿名网友 选择了B
[131.***.***.84] 1天前
匿名网友 选择了C
[41.***.***.155] 1天前
匿名网友 选择了B
[143.***.***.209] 1天前
匿名网友 选择了B
[228.***.***.153] 1天前
加载更多
提交我的答案
登录提交答案,可赢取奖励机会。
更多“以下程序的运行结果是 typedef struct { ch…”相关的问题
第1题
以下程序的运行结果是______。 struct Node} int x; char ch; }; fun(struct Node*sn) } static k=1; sn->x=20; Sn->ch=a+k++; } main() { int i; static struct Node st=}10,a}; for(i=0;i<2;i++) fun(&st); printf("%d,%c\n",st.x,st.ch); }
点击查看答案
第2题
#include <stdio.h> void main() { int a; a = (int)((double)3 / 2 + 0.5 + (int)1.99 * 2); printf("%d\n", a); } 程序的运行结果是:
点击查看答案
第3题
以下程序的运行结果是【 】。 include main() { int fun(); fun();} fun () { static int a[3]={0,1,2}; int i; for(i=0;i<3;i++)a[i]+=a[i]; for(i=0;i<3;i++)printf("%d,",a[i]); printf("\n");}
点击查看答案
第4题
请读程序:#includevoidfun(float*pl,float*p2,float*s...

请读程序:#includevoidfun(float*pl,float*p2,float*s){s=(float*)calloc(1,sizeof(float));*s=*p1+*(p2++);}main(){floata[2]={1.1,2.2},b[2]={10.0,20.0},*s=a;fun(a,b,s)printf(""%f\n"",*s);}上面程序的输出结果是()

A. 11.100000

B. 12.100000

C. 21.100000

D. 1.100000

点击查看答案
第5题
阅读以下程序,填写运行结果______________. def fun(a): return a+1 def f(b): return b*2 print(fun(3)+f(3))
点击查看答案
第6题
下列给定程序中,函数fun()的功能是:对N名学生的学习成绩,按从高到低的顺序找出前叫m≤10)名学生来,并将这些学生数据存放在一个动态分配的连续存储区中,此存储区的首地址作为函数值返回。

请改正程序中的错误,使它能得出正确的结果。

注意:不要改动main函数,不得增行或删行,也不得更改程序的结构.

试题程序:

include <conio.h>

include <string.h>

include <stdio.h>

include <alloc.h>

define N 10

typedef struct ss

{char num[10];

int s;

} STU;

STU *fun{STU a[], int m)

{ STU b[N] ,*t;

int i, j,k;

/*************found**************/

*t=calloc (m, slzeof (STU));

for(i=0;i<N;i++) b[i]=a[i];

for(k=0; k<m; k++)

{ for (i=j=0;i<N;i++)

if (b[i].s>b[j].s) j=i;

/*************found**************/

t[k].num=b [j].num;

t[k].s=b[j] s;

b[j].s=0;

}

return t;

}

outresult(STU a[],FILE *pf)

{ int i;

for (i=0; i<N; i++)

fprintf(pf, "No=%s Mark-%d\n ",

a [i] .num, a[i].s);

fprintf(pf, "\n\n ");

}

main ( )

{ STU a[N]={{ "A01 ",81},{ "A02 ",89},

{ "A03 ",66},{ "A04 ",87},{ "A05 ",77},

{ "A06 ",90},{ "A07 ",79},{ "A08 ",61},

{ "A09 ",80},{ "Al0 ",71}};

STU *pOrder;

int i, m;

clrscr ();

printf ("*****THE RESULT***** \n");

outresult (a, stdout);

printf ("\nGive the number of the students

who have better score: ");

scanf ("%d", &m);

while (m>10)

{ printf("lnGive the number of the

students who have better score: ");

scanf ("%d", %m);

pOrder=fun (a,m);

printf("***** THE RESULT*****kn");

printf("The top :\n");

for (i=0; i<m; i++)

printf("%s %d\n",pOrder[i].num,

p0rder [i]. s);

free (pOrder);

}

点击查看答案
第7题
以下程序的输出结果是 void fun(flaot *a, float *b) { float w; *a = *a + *a; w = *a; *a = *b; *b = w; } main() { float x = 2.0; y = 3.0; float *px = &x, *py = &y; fun(px, py); printf("%2.0f,%2.0f\n", x, y); }

A、2, 3

B、3, 4

C、3, 2

D、4, 3

点击查看答案
第8题
以下程序的输出结果是_[13]_______

#include

#include

char *fun(char *t)

{ char *p=t;

return(p+strlen(t)/2);

}

main()

{ char *str="abcdefgh";

str=fun(str);

puts(str);

}

点击查看答案
账号:
你好,尊敬的用户
复制账号
发送账号至手机
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
欢迎分享答案

为鼓励登录用户提交答案,简答题每个月将会抽取一批参与作答的用户给予奖励,具体奖励活动请关注官方微信公众号:简答题

简答题官方微信公众号

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
简答题
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反简答题购买须知被冻结。您可在“简答题”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
简答题
点击打开微信