考题
下面程序的运行结果是()。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
考题
有下列程序: 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
考题
下面程序的运行结果是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 "string.h"#include "stdio.h"sort(char *a[],int n){ int i,j;char *p;for(j=1;j=n-1;j++)for(i=0; 【15】 ;i++)if( 【16】 0){ p=a[i];a[i]=a[i+1];a[i+1]=p;}}main(){ int i;char *book[]={"itisme","itisyou","howareyou","fine","goodnight","goodbye"};sort( 【17】 );for(i=0;i6;i++)printf("%s\n",book[i]);}
考题
有以下程序: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
考题
有以下程序: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