单项选择题

有如下程序:
main()
char ch[2][5]="6937","8254",*p[2];
int i,j,s=0;
for(i=0;i<2;i++)p[i]=ch[i];
for(i=0;i<2;i++)
for(j=0;p[i][j],’\0’;j+=2)
s=10*s+p[i][j]-’0’;
printf("%d\n",s);
该程序的输出结果是( )。

A.69862358
B.5825
C.6385
D.693825
<上一题 目录 下一题>
热门 试题

单项选择题
下列程序执行后的输出结果是( )。 void func1(int i); void func2(int i); char st[]= hello, friend! ; void func1(int i) printf( %c ,st[i]); if(i<3)(i+=2;func2(i); void func2(int i) printf( %c ,st[i]); if(i<3m+=2;func1(i); main() int i=0;func1(i);printf( n );
A.hllo
B.heel
C.hlo
D.hlm
单项选择题
阅读下列程序,当运行函数时,输入asd af aa z67,则输出为( )。 #include<stdio.h> #include<ctype.h> #include<string.h> int fun(char *str) int i,j=0; for(i=0;str[i]!=’ 0’;i++) if(str[i]!= )str[1++]=str[i]; str[j]=’ 0’; main() char str[81]; int n; printf( Input a string: ); gets(str); puts(str); fun(str); printf( %s n ,str);
A.asdafaaz67
B.asd af aa z67
C.asd
D.z67
相关试题
  • 有如下程序: #include<stdio.h> mai...
  • 请阅读以下程序: #include<stdio.h>...