单项选择题

请读程序:
main()
{inti,k,a[10],p[3]:
k=5;
for(i=0;i<10;i)a[i]=i;
for(i=0;i<3;i)p[i]=a[i*(i1)];
for(i=0;i<3;i)k=p[i]*2;
printf(“%d、n”,k);
}
则上面程序的输出结果是()

A.20
B.21
C.22
D.23

<上一题 目录 下一题>
热门 试题

单项选择题
函数AAA(s,t) char*s,*t; {while(*t++); t--; while(*t++=*s++); } 的功能是:()。

A.求串的长度
B.比较两个串的大小
C.将串s复制到串t中
D.将串s连接到串t中

单项选择题
下列程序执行后的输出结果是() voidfunc1(inti); voidfunc2(inti); charst[]= hello,friend! ; voidfunc1(inti) {printf( %c ,st[i]); if(i<3){i+=2;func2(i);} } voidfunc2(inti) {printf( %c ,st[i]); if(i<3){i+=2;func1(i);} } main() {inti=0;func1(i);printf( n );}

A.hello
B.hel
C.hlo
D.hlm

相关试题
  • 模块的基本特性是(),并且可以被集成。
  • 编写功能需求规格说明时不需要描述的是()
  • 编写功能需求文档时以下描述错误的是()
  • 下面哪项不属于系统测试的主要目标()
  • 增殖式集成方式不包括()