题目内容

有以下程序#include main(){ char c[2][5]={ "6934", "8254" },*p[2] ;int i, j, s=0;for( i=0; i<2; i++ ) p[i]=c[i];for( i=0; i<2; i++ )for( j=0; p[i][j]>'0' && p[i][j]<='9'; j+=2 )s = 10*s + p[i][j] - '0';printf( "%d\n" ,s );}程序的输出结果是

A. 693825
B. 69825
C. 63825
D. 6385

查看答案
更多问题

有以下程序(strcpy为字符串复制函数,strcat为字符串连接函数)#include #include main(){ char a[10] = "abc", b[10] = "012", c[10] = "xyz";strcpy( a+1, b+2 );puts( strcat( a, c+1 ) );}程序运行后的输出结果是

A. a12xyz
B. bc2yz
C. a2yz
D. 12yz

以下选项中,没有编译错误的是

A. char str3[] = {'d', 'e', 'b', 'u', 'g', '\0'};
B. char str1[5] = "pass", str2[6]; str2 = str1;
C. char name[10]; name = "china";
D. char str4[]; str4 = "hello world";

有以下程序#include main(){char a[5][10] = {"one", "two", "three", "four", "five" };int i, j;char t;for ( i=0; i<2; i++ )for ( j=i+1; j<5; j++ )if ( a[i][0] >a [j][0] ){t=a[i][0];a[i][0]=a[j][0];a[j][0]=t;}puts(a[1]);}程序运行后的输出结果是

A. owo
B. fwo
C. two
D. fix

有以下程序#include #include main(){ int i;char a[]="How are you!";for (i=0; a[i]; i++)if (a[i] == ' ')strcpy(a, &a[i+1]);printf("%s\n",a);}程序的运行结果是

A. are you!
B. Howareyou!
C. areyou!
D. you!

答案查题题库