有以下程序: #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,aaaacc
B.aaaacc,xy
C.bcc,aabcc
D.aabcc,bcc
[单选题]有以下程序: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];
[单选题]有以下程序:includeincludevoid main( ){char * p="abcde/0fghjik/0";c有以下程序: #include<string.h> #include<iostream.h> void main( ) { char * p="abcde/0fghjik/0"; cout < < strlen(p) ;} 程序运行后的输出结果是A.12B.15C.6D.5
[单选题]有以下程序includeincludevoid main( ){char*p="abcde/0fghjik/0"; cou有以下程序 #include<string.h> #include<iostream.h> void main( ) { char*p="abcde/0fghjik/0"; cout<<strlen(p);} 程序运行后的输出结果是A.12B.15C.6D.5
[单选题]请阅读以下程序:includeincludevoid fun(int b[]){static int i=0;do{b[i]请阅读以下程序: #include<stdio.h> #include<string.h> void fun(int b[]) { static int i=0; do {b[i]+=b[i+1]; }while(++i<2);} main() { int k,a[5]={1,3,5,4,9}; fun(A); for(k=0;k<5;k++)printf("%d",a
[单选题]以下程序的执行结果是()。includeincludevoid fun(int n){if(n!=0){fun以下程序的执行结果是( )。 #include<iostream.h> #include<iomanip.h> void fun(int n) { if(n!=0) { fun(n-1); for(int i=1; i<=n; i++) cout<<setw(3)<<i; cout<<end1; } } void main() { fun(3); }A.0 0 1 0 1 2B.1
[单选题]有以下程序:includevoid fun(char*t,char*s){while(*t!=0)t£«£«;while((*t£«£«=*s£«£«)!=0);有以下程序: #include<stdio.h> void fun(char*t,char*s) { while(*t!=0)t++; while((*t++=*s++)!=0); } main() { char ss[10]="acc",aa[10]="bbxxyy"; fun(ss,Aa);printf("%s,%s/n
[单选题]有以下程序 include void fun(char *t,char *s) { while(*t!=0) t£«£«; while((*t£«£«=*s有以下程序#include <stdio.h>void fun(char *t,char *s){ while(*t!=0) t++;while((*t++=*s++)!=0);}main( ){ char ss[10]="acc",aa[10]="bbxxyy";fun(ss,aa); printf("%s,%s/n",ss,
[单选题]有以下程序 include int fun(char s[]) { int n=O; whil有以下程序 #include <stdio.h> int fun(char s[]) { int n=O; while(*s<='9'&&*s>='0') { n=10*n+*s-'0'; s++; } return (n); } main() { char s[10]={ '6', '1', '*', '4', '*', '9', '*',
[单选题]有以下程序 include int fun(char s[ ]) { int n=0; while(*s='0有以下程序#include <stdio.h>int fun(char s[ ]){ int n=0;while(*s<='9'&&*s>='0') {n=10*n+*s-'0';s++;}retum(n);}main( ){ char s[10]={'6','1','*','4','*','9','*','0','*'
[单选题]有以下程序 include int fun(char s[]) { int n=O; whil有以下程序 #include <stdio.h> int fun(char s[]) { int n=O; while(*s<='9'&&*s>='0') { n=10*n+*s-'0'; s++; } return (n); } main() { char s[10]={ '6', '1', '*', '4', '*', '9', '*',