网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有下列程序: #include<stdi0.h> #include"string.h" voidfun(char*s[],intn) { char*t;inti,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;} } voidmain( ) { char*ss[]=("bcc","bbcc","xy","aaaacc","aab— cc"}; fun(ss,5);printf("%s,%s\n",ss[O],ss[4]);} 程序的运行结果是( )。
A.xy,aaaacc
B.aaaacc,xy
C.bcc,aabcc
D.aabcc,bcc
参考答案
更多 “ 有下列程序: #includestdi0.h #include"string.h" voidfun(char*s[],intn) { char*t;inti,j for(i=0;in-1;i++) for(j=i+1;jn;j++) if(strlen(s[i]strlen(s[j])){t=s[i];s[i]=s [j];s[j]=t;} } voidmain( ) { char*ss[]=("bcc","bbcc","xy","aaaacc","aab— cc"}; fun(ss,5);printf("%s,%s\n",ss[O],ss[4]);} 程序的运行结果是( )。A.xy,aaaaccB.aaaacc,xyC.bcc,aabccD.aabcc,bcc ” 相关考题
考题
有下列程序: 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
考题
有以下程序:includeincludeincludevoid f(char*s,char*t){char k;k=*s; *
有以下程序: #include<stdio.h> #include<string.h> #include void f(char*s,char*t) { char k; k=*s; *s=*t; *t=k; s++;t--; if(*s)f(s,t): } main() {char str[10]="abcdefg",*P; P=str+strlen(str)/2+1: f(p,p-2); printf("%s\n",str); } 程序运行后的输出结果是( )。A.abcdefgB.gfedcbaC.gbcdefaD.abedcfg
考题
有以下程序: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
考题
有下列程序:includevoid fun(char *a, char *B){while(*a=='*')a++;while(*b=*A){b++;
有下列程序: #include <stdio.h> void fun(char *a, char *B) { while(*a=='*')a++; while(*b=*A) {b++;a++;} } main() { char *s="*****a*b****",t[80]; fun(s,t);puts(t); 程序的运行结果是( )。A.*****a*bB.a*bC.a*b****D.ab
考题
有以下程序: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
考题
有以下程序: include include void f(char * s,char*t){char k; k=*s;*s=*
有以下程序: #include <stdio.h>#include <string.h>void f(char * s,char*t){ char k; k=*s; *s=*t; *t=k; s++; t--; if( * s) f(s,t);}main( ){ char str[10] :"abedefg", * p; p = str + strlen(str)/2+1; f(p,p -2); printf( "% s \n" ,str);程序运行后的输出结果是( )。A.abcdefgB.gfedcbaC.gbcdefaD.abedcfg
考题
有以下程序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
考题
下面程序的运行结果是______。 include include fun(char*w,int n) { char
下面程序的运行结果是______。 #include<stdio.h> #include<string.h> fun(char*w,int n) { char t,*s1,*s2; s1=w;s2=w+n-1; while(s1<s2) {t=*s1++;*s1=*s2--;*s2=t;} } main() { char*p; p="1234567"; fun(p,strlen(p)); puts(p); }A.7654321B.1714171C.1711717D.7177171
热门标签
最新试卷