网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

有以下程序

#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


参考答案

更多 “ 有以下程序#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 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

考题 有以下程序: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

考题 有以下程序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

考题 有以下程序: #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

考题 有以下程序#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

考题 以下程序#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

考题 有以下程序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

考题 (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