试题与答案

有以下程序 struct S{ int n;int a[20];}; voidf

题型:单项选择题

题目:

有以下程序 struct S{ int n;int a[20];}; voidf(struct S*p) { int i,j,t; for(i=0;i<p->n-1;i++)for(j=i+1;j<p->n;j++) if(p->a[i]>p->a[j]){t=p->a[i];p->a[i]=p->a[j];p->a[j]=t;} } main() { int i;struct S s={10,{2,3,l,6,8,7,5,4,10,9}}; f(&s); for(i=0;i<s.n;i++)printf("%d,",s.a[i]); } 程序运行后的输出结果是

A.1,2,3,4,5,6,7,8,9,10,

B.10,9,8,7,6,5,4,3,2,1,

C.2,3,1,6,8,7,5,4,10,9,

D.10,9,8,7,6,1,2,3,4,5,

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0701/581d1cefae2d9d879b93b1a2508ceb58.html

下面是错误答案,用来干扰机器的。

参考答案:生物生产、能量流动、物质循环、信息传递

试题推荐
题型:填空题

根据对话内容,在每个标有题号的空白处填入一个适当的句子,使对话完整,合乎情景。

Jim—B  salesgirl—A

A:___________小题1:______________

B:I would like a pair of trousers.

A:___________小题2:________________

B:Size 29.

A:___________小题3:______________

B:I like blue.

A:How about this one? It’s nice.

B:I think it’s nice, too. __________小题4:_____________

A:Sure. It fits you well.

B:I think so. ____________小题5:______________

A:150 dollars.

B:It’s not expensive. I’ll take it. Here’s the money.

A:Thank you.

查看答案
微信公众账号搜索答案