(21)有以下程序#include stdio.hmain(){ char s[]="012xy\08s34f4w2";int i,n=0;for(i=0;s[i]!=0;i++)if(s[i]='0's[i]='9') n++;printf("%d\n",n);}程序运行后的输出结果是A)0B)3C)7D)8

(21)有以下程序

#include <stdio.h>

main()

{ char s[]="012xy\08s34f4w2";

int i,n=0;

for(i=0;s[i]!=0;i++)

if(s[i]>='0'&&s[i]<='9') n++;

printf("%d\n",n);

}

程序运行后的输出结果是

A)0

B)3

C)7

D)8


相关考题:

( 12 ) 有以下程序#include stdio.h#include string.hvoid fun ( char *str ){ char temp;int n,i;n=strlen ( str ) ;temp=str[n-1];for ( i=n-1;i0;i-- ) str[i]=str[i-1];str[0]=temp;}main (){ char s[50];scanf ( " %s " ,s ) ; fun ( s ) ; printf ( " %s\n " ,s ) ;}程序运行后输入: abcdef 回车 ,则输出结果是 【 12 】 。

有以下程序#include stdio.hmain(){ char s[]={"012xy"};int i,n=0;for(i=0;s[i]!=0;i++)if(s[i]= 'a' s[i]= 'z') n++;printf("%d\n",n);}程序运行后的输出结果是A)0B)2C)3D)5

有以下程序:includeincludevoid fun(char s[][10],int n){char t;int i,j; 有以下程序: #include<stdio.h> #include<string.h> void fun(char s[][10],int n) { char t;int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) /*比较字符串的首字符大小,并交换字符串的首字符*/ if(s[i][0]>s[j][0]){t=s[i][0];s[i][0]=s[j][0];sEj][0]=t;} } main() {char s[5][10]={"bcc","bbcc","xy","aaaacc","aabcc"); fun(ss,5);printf("%s,%s\n",ss[0],ss[4]); } 程序的运行结果是( )。A.xy,aaaaccB.aaaacc,xyC.xcc,aabccD.acc,xabcc

有下列程序: include include "string.h" void tim(char *s[],int n) 有下列程序: #include <stdio.h> #include "string.h" void tim(char *s[],int n) { char *t;int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strlen(s[i])>strlen(s[j])) {t=s[i];s[i]=s[j];s[j]=t;} } main() { char *ss[]= {"bcc","bbcc","xy","aaaacc","aabcc"}; fun(ss,5);printf("%s,%s\n",ss[0],ss[4]); } 程序的运行结果是( )。A.xy,aaaaccB.aaaacc,xyC.bcc,aabccD.aabcc,bcc

有以下程序:includestdio.hmain( ){char s[]=012xy\O8s34f4w2‘;int i;n=0; ,for(i=0;s[i]!=0;i++)if(s[i]=0s[i]=9)n++;printf(%d\n,n);}程序运行后的输出结果是( )。A.0B.3C.7D.8

以下程序用以删除字符串中所有的空格,请填空。 include main() {char s[100]={"Our teac 以下程序用以删除字符串中所有的空格,请填空。include<stdio.h>main(){char s[100]={"Our teacher teach C language!"};int i,j;for(i=j=0;s[i]!='\0';i++)if(s[i]!=''){( )}s[j]='\0';printf("%s\n",s);}

有以下程序 include include void fun(char s[][10],int n 有以下程序 #include <stdio.h> #include <string.h> void fun(char s[][10],int n) { char t; int i j; for (i=0; i<n-1; i++) for 0--i+l; j<n; j++) /*比较字符串的首字符大小,并交换字符串的首字符*/ if(s[i][0] > s[j][0]) { t = s[i][0]; s[i][0] = s[j][0]; s[j][0] = t;} } main() { char ss[5][10]= {"bcc", "bbcc", "xy", "aaaacc", "aabcc" }; fun(ss, 5); printf("%s,%s\n", ss[0],ss[4]); } 程序的运行结果是A.xy, aaaaccB.aaaacc,xyC.xcc,aabccD.acc,xabcc

有以下程序:include include main( ) {char a[ 7 ] = "a0 \0a0 \0";int i, 有以下程序:#include <stdio.h>#include <string.h>main( ) { char a[ 7 ] = "a0 \0a0 \0"; int i,j; i = sizeof(a); j = strlen(a); printf(" % d %d \n" ,i,j); }程序运行后的输出结果是( )。A.22B.76C.72D.62

有以下程序:includeincludevoid fun(char*s[],int n){char*t;int i,j;for( 有以下程序: #include<stdio.h> #include<string.h> void fun(char*s[],int n) { char*t;int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strlen(s[i])>strlen(s[j])){t=s[i];s[i]=s[j];s[j]=t;} } main() { Char*ss[]={"bcc","bbcc","xy","aaaacc","aabcc"}; fun(ss,5);printf("%s,%s\n",ss[0],ss[4]); } 程序的运行结果是( )。A.xy,aaaaccB.aaaacc,xyC.bcc,aabccD.aabcc,bcc

有以下程序includeincludevoidfun(char*s[],intn){char*t;int i,j;for(i=0 有以下程序 #include <stdio.h> #include <string.h> void fun(char *s[],int n) { char *t; int i,j; for(i=0;i<n-1;++) for(j=i+1;j<n;j++) if(strlen(s[i])>strlen(s[j])) {t=s[i];s[i];s[j];s[j]=t;} } main() { char *ss[]={"bccA.xy,aaaaccB.aaaacc,xyC.bcc,aabccD.aabcc,bcc

以下程序运行后输入:3,abcde回车,则输出结果是【 】include move(char *str, 以下程序运行后输入:3,abcde回车,则输出结果是【 】include <string.h>move(char *str, int n){ char temp; int i;temp=str[n-1];for(i=n-1;i>0;i--) str[i]=str[i-1];str[0]=temp;}main( ){ char s[50]; int n, i, z;scanf("%d,%s",n,s);z=strlen(s);for(i=1; i<=n; i++) move(s, z);printf("%s\n",s);}

有以下程序include main(){ int.i=0,a=0;while(i 有以下程序 #include <stdio.h> main() { int.i=0,a=0; while(i<20) { for(;;) { if((i%10)==0) break; else i--; } i+=11; a+=i; } printf("%d\n",a) ; } 程序运行后的输出结果是( )A.21B.32C.33D.11

有以下程序: #includestdio.h main( ) {char s[]="012xy\O8s34f4w2‘; int i;n=0; , for(i=0;s[i]!=0;i++) if(s[i]=0s[i]=9)n++; printf("%d\n",n); } 程序运行后的输出结果是( )。A.0B.3C.7D.8

有以下程序: #includestdio.h . main( ) {char s[]={"012xy"};int i,n=o; for(i=0;s[i]!=0;i++) if(s[i]=as[i]=z)n++; printf("%d\n",n); } 程序运行后的输出结果是( )。A.0B.2C.3D.5

以下程序运行后的输出结果是( )。 include main() {char ch[]="abcd",x[4][4];int i; f 以下程序运行后的输出结果是( )。 include<string.h> main() {char ch[]="abcd",x[4][4];int i; for(i=0;i<4;i++)strcpy(x[i],ch); for(i=0;i<4;i++)printf("%s",x[i][i]); printf("\n"); }

有以下程序#includestdlo.hmain( ){char s[]={“012xy”};int i,n=0;for(i=0;s[i]!=0;i++)if(s[i]=‘a’&&8[i]‘z’)n++:printf(”%d\n”,n);}程序运行后的输出结果是A.0B.2C.3D.5

有以下程序#includestdio.hmain(){char s[]=“012xy\08s34f4w2”;int i,n=0:for(i=0;s[i]!=0;i++)if(s[i]=‘0’&&s[i]=‘9’)n++:printf(“%d\n”,n):}程序运行后的输出结果是A.0B.3C.7D.8

有以下程序:include fun( char p[] [10]){int n=0,i; for(i=0;i 有以下程序:#include <stdio.h>fun( char p[] [10]){ int n=0,i; for(i=0;i<7;i ++) if(p[i][0] =='T') n++; return n;}main( ){ char sir[] [10] = { "Mon" ,"Tue" ,"Wed" ,"Thu" ,"Fri" ,"Sat" ,"Sun" }; prlnff(" % d\n" ,fun(str) );}程序执行后的输出结果是( )。A.1B.2C.3D.0

有以下程序includevoid main(){char s[]={"01aXy"};int i,n=0;for(i=0;s[i]!=0;i++)if 有以下程序 #include<stdio.h> void main() { char s[]={"01aXy"};int i,n=0; for(i=0;s[i]!=0;i++) if(s[i]<='a's[i]>='z')n++; printf("%d\n",n); } 程序运行后的输出结果是( )。A.0B.2C.3D.5

以下程序#includemain(){ char s[]=012xy\08s34f4w2;int i,n=0;for(i=0;s[i]!=0;i++)if(s[i]=0s[i]=9) n++;printf(%d\n,n);}程序运行后的输出结果是A.0B.3C.7D.8

有以下程序:includestdio.hmain( ){char s[]={012xy};int i,n=o;for(i=0;s[i]!=0;i++)if(s[i]=as[i]=z)n++;printf(%d\n,n);}程序运行后的输出结果是( )。A.0B.2C.3D.5

下列程序的输出结果是______。include main(){union {int k;char i[2]; }*S,a; s= 下列程序的输出结果是______。#include <stdio.h>main(){ union { int k; char i[2]; } *S,a; s=a; s->i[0]=0x39; s->i[1]=0x38; printf("%x\n",s->k);}A.3839B.3938C.380039D.390038

有以下程序includeincludevoidfun(char,*s[],intn){char*t;inti,j; for(i= 有以下程序 #include <stdio.h> #include <string.h> void fun(char,*s[],int n) { char *t; int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strlen(s[i])>strlen(s[j])) {t=s[i];s[i]:s[j];s[j]=t;} } main() { char *ss[]={"bcc","bbcc","xy","aaaacc","aabcc"}; fun(ss,5); printf("%s,%s\n",ss[0],ss[4]); } 程序的运行结果是A.xy,aaaaccB.aaaacc,xyC.bcc,aabccD.aabcc,bcc

下面程序的运行结果是()。includevoid delch(char *s){ int i,j;char*a;a=s;for(i=0,j= 下面程序的运行结果是( )。 #include<stdio.h> void delch(char *s) { int i,j; char*a; a=s; for(i=0,j=0;a[i]!='\0' ;i++) if(a[i]>='0' a[i]<='9') { s[j]=a[i]; j++;} s[j]='\0'; } main() { char*item="a34bc"; delch(item); printf("\n%s" ,item);}A.abcB.34C.a34D.a34bc

单选题有以下程序:#include main(){ char s[] = 012xy\08s34f4w2; int i,n = 0; for(i = 0;s[i]!='0';i++)  if(s[i]'0' s[i]='9')n++; printf(%d,n);}程序运行后的输出结果是(  )。A0B3C7D8

单选题有以下程序:#include #include void fun(char *s[],int n){ char *t; int i,j; for(i=0;i  for(j=i+1;j   if(strlen(s[i])strlen(s[j]))   {    t=s[i];    s[i]=s[j];    s[j]=t;   }}main(){ char *ss[]={"bcc","bbcc","xy","aaaacc","aabcc"}; fun(ss,5); printf("%s,%s",ss[0],ss[4]);}程序的运行结果是(  )。Axy,aaaaccBaaaacc,xyCbcc,aabccDaabcc,bcc

单选题有以下程序:#include main(){ char s[]={012xy}; int i,n=0; for(i=0;s[i]!=0;i++) if(s[i]='a's[i]='z')n++; printf(%d,n);}程序运行后的输出结果是(  )。A0B2C3D5