有以下程序main(){ char a[]={ ′a′, ′b′, ′c′,′d′, ′\0′, ′f′, ′g′,′h′,′\0′}; int i,j; i=sizeof(a); j=strlen(a); printf("%d,%d\b",i,j);}程序运行后的输出结果是A.9,4 B.8,4 C.1,8 D.9,8
有以下程序main(){ char a[]={ ′a′, ′b′, ′c′,′d′, ′\0′, ′f′, ′g′,′h′,′\0′}; int i,j; i=sizeof(a); j=strlen(a); printf("%d,%d\b",i,j);}程序运行后的输出结果是A.9,4 B.8,4 C.1,8 D.9,8
相关考题:
下面程序的运行结果是()。includevoid del(char*s){int i,j;char *a;a=s;for(i=0,j=0;a 下面程序的运行结果是( )。 #include<stdio.h> void del(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 s[]="aa89gggh"; del(s); printf("\n%s",s); }A.aaB.89C.ggghD.aa89gggh
下面程序的运行结果是includevoid delch(char*s){int i,j;char *a;a=S;for(i=0,j=0;a[ 下面程序的运行结果是 #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' aa[i]<='9') {s[j]=a[i]; j++;} s[j]='\0';} main() { char *item="a34bC"; delch(item); printf("\A.abcB.34C.a34D.a34bc
有以下程序:include main( ) char * p[ ] = {"3697" ,"2548" }; int i,j;long num =0 有以下程序: #include <stdio.h> main( ) char * p[ ] = {"3697" ,"2548" }; int i,j; long num =0; for(i =0;i<2;i ++ ) { j =0; while(p[i][j]! ='\0') { if((p[i][j]-'0')%2) num=10*num+p[i][j]-'0'; j+ =2; } printf( "%d \n" ,num);}程序执行后的输出结果是( )。A.35B.37C.39D.3975
有以下程序: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
有以下程序,其中函数f的功能是将多个字符串按字典顺序排序:includevoidf(char*p[],in 有以下程序,其中函数f的功能是将多个字符串按字典顺序排序: #include<string.h> voidf(char*p[],intn) { char*t;int i,j; for(i=0;i<n-1;i++) for (j=i+1;j<n;j++) if(strcmp(p[i],p[j])>0) { t=p[i]; p[i]=p[j]; p[j]=t; } } main() { char*p[5]={"abc"A.2B.3C.6D.4
有以下程序:includeinclude"string.h"void 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[]={"bee","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;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