有以下程序: include void fun(char(*p)[6]) { int i; for(i=0;i 有以下程序: #include void fun(char(*p)[6]) { int i; for(i=0;iA.Aa1FB.Ab3IC.ABCDD.fghij

有以下程序: include void fun(char(*p)[6]) { int i; for(i=0;i<4;i++)printf("%c&

有以下程序: #include void fun(char(*p)[6]) { int i; for(i=0;i<4;i++)printf("%c",p[i][i]); printf("\n"); } main( ) { char s[6][6]={"ABCDE","abcde","12345","FGHIJ","fghij","54321"}; fun(s); } 程序的运行结果是( )。

A.Aa1F

B.Ab3I

C.ABCD

D.fghij


相关考题:

有以下程序#include stdio.h#define N 4void fun(int a[][N], int b[]){ int i;for(i=0;iN;i++) b[i] = a[i][i];}main(){ int x[][N]={{1,2,3},{4},{5,6,7,8},{9,10}},y[N],i;fun(x,y);for(i=0;iN;i++) printf("%d,",y[i]);printf("\n");}程序的运行结果是A)1,2,3,4,B)1,0,7,0,C)1,4,5,9,D)3,4,8,10,

有以下程序,程序执行后,输出结果是【11】#include stdio.hvoid fun (int *a){a[0=a[1];]}main(){int a[10]={10,9,8,7,6,5,4,3,2,1},i;for(i=2;i=0;i--) fun{a};for(i=0;i10;i++) printf(“d”,a);printf(“\n”);}

有以下程序 , 程序执行后 , 输出结果是【 1 1 】#include stdio.hvoid fun(int *a){ a[0]=a[1];}main(){ int a[10]={10,9,8,7,6,5,4,3,2,1},i;for(i=2;i=0;i--) fun(a[i]);for(i=0;i10;i++) printf("%d",a[i]);printf("\n");}

有以下程序 include int i=0; void fun( ) { { static int i=1 有以下程序 #include<iostream> int i=0; void fun( ) { { static int i=1; Std::cout<<i++<<','; } Std::cout<<i<<','; } int main( ) { fun();fun(); return O; } 程序执行后的输出结果是A.1,2,1,2,B.1,2,2,3,C.2,0,3,0,D.1,0,2,0,

有以下程序 include void f(char p[][10],int n)/*字符串从小到大排序*/ { 有以下程序 #include<string.h> void f(char p[][10],int n)/*字符串从小到大排序*/ { char t[10];int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strcmp(p[i],p[j])>0) {strcpy(t,p[i]);strcpy(p[i],p[j]);strcpy(p[j],t);} } main() { char p[5][10]={"abc","aabdfg:,"abbd","dcdbe","cd"}; f(p,5); printf("%d\n",strlen(p[0])); } 程序运行后的输出结果是A.2B.4C.6D.3

以下程序的运行结果是______。includemain(){ int fun();fun();}fun(){static int a[3]= 以下程序的运行结果是______。include<stdio.h>main(){ int fun();fun();}fun(){static int a[3]={0,1,2};int i;for(i=0;i<3;i++)a[i]+=a[i];for(i=0;i<3;i++)printf("%d,",a[i]);pfintf("\n",);}

已知C源程序如下: include include void reverse(char S[]){ int C,i,J; f 已知C源程序如下:include<stdio. h>include<string. h>void reverse(char S[]){int C,i,J;for(i=0,j=strlen(s)-1;i<j;i++,j++){c=s[i];s[i]=s[j];s[j]=c;}}void getHex(int number,char s[]){int I;i=0;while(number>0){if(number%16<10)s[i++]=number%16+'0';elseswitch(number%16){case 10:s[i++]='A';break;case 11:s[i++]='B';break;case 12:s[i++]='C';break;case 13:s[i++]='D';break;case 14:s[i++]='E';break;case 15:s[i++]='F';break;default:printf("Error");break;}number/=16;}s[i]:'\o';reverse(s);}int main(){unsigned int number;int i=0:char s[50];printf("%s","please input number;\n");scanf("%d",&number):getHex(number,s);i=0;while(s[i])printf("%c",s[i++]);return 0;}画出程序中所有函数的控制流程图。

有以下程序 include include void fun(char s[][10],int n 有以下程序 #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 0--i+l; j<n; j++) /*比较字符串的首字符大小,并交换字符串的首字符*/ if(s[i][0] > s[j][0]) { t = s[i][0]; s[i][0] = s[j][0]; s[j][0] = t;} } main() { char ss[5][10]= {"bcc", "bbcc", "xy", "aaaacc", "aabcc" }; fun(ss, 5); printf("%s,%s\n", ss[0],ss[4]); } 程序的运行结果是A.xy, aaaaccB.aaaacc,xyC.xcc,aabccD.acc,xabcc

有以下程序: void fun(int *a,int i,int i) { int t; if(i<j) { t==a[i];a[i]=a[j];a[i]=t; i++; j--; fun(a,i,j); } } main() { int x[]={2,6,1,8),i; fun(x,0,3), for(i=0;i<4;i++) printf("%2d",x[i]); printf("\n"); } 程序运行后的输出结果是( )。A.1268B.8621C.8162D.8612

有以下程序 include void fun(int *a, int n)/* fun 函数的功能是将a所指数 有以下程序 #include <stdio.h> void fun(int *a, int n)/* fun 函数的功能是将a所指数组元素从大到小排序*/ { int t, i,j; for (i=0; i<n-1 ;i++) for 0=i+l; j<n; j++) if(a[i]<a[j]) { t=a[i]; a[i]=a[j]; a[j]=t; } } main() { int c[10]= { 1,2,3,4,5,6,7,8,9,0},i; fun(c+4, 6); for (i=0;i<10; i++) printf("%d,", c[i]); printf("\n"); }A.1,2,3,4,5,6,7,8,9,0,B.0,9,8,7,6,5,1,2,3,4,C.0,9,8,7,6,5,4,3,2,1,D.1,2,3,4,9,8,7,6,5,0,

以下程序的输出结果为()。includemain(){ char *alpha[6]={"ABCDEFGH","IJKL","MNOP"," 以下程序的输出结果为( )。 #include<stdio.h> main() { char *alpha[6]={"ABCDEFGH","IJKL","MNOP","QRST","UVWX"}; char**p;int i; p=alpha; for(i=0;i<4;i++)printf(" %s" ,p[i]);printf("\n" );}A.ABCDEFGHIJKLB.ABCDC.ABCDEFGHIJKLMNOPQRSTD.AEIM

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

有以下程序:includevoid f(char p[][10],int n){char t[10];int i,j;for(i=0;i 有以下程序: #include<string.h> void f(char p[][10],int n) {char t[10];int i,j; for(i=0;i<n-1;i++) for(j=i+1;j<n;j++) if(strcmp(p[i],p[j])>0) {strcpy(t,p[i]);strcpy(p[i],p[j]);strcpy(p[j],t);} } main() {char p[5][10]={"abc","aabdfg","abbd","dedbe","cd"}; f(p,5); printf("%d\n",strlen(p[0]));} 程序运行后的输出结果是( )。A.2B.4C.6D.3

有以下程序:include void fun(iht * a,int i,int j){int t;if(i 有以下程序:#include <stdio, h>void fun(iht * a,int i,int j){ int t; if(i < j) { t=a[i];a[i] =a[j] ;a[j]=t; i++;j--; fun(a,i,j);main ( ) int x[ ]: {2,6,1,8} ,i; fun(x,0,3); for( i=0;i <4;i ++ ) printf( "%2d" ,x[i] ); printf(" \n");A.1268B.8621C.8162D.8612

有以下程序 include void fun(int a, int b) {int t; t=a; a=b; 有以下程序 #include<stdio.h> void fun(int a, int b) {int t; t=a; a=b; } int c[10]={1,2,3,4,5,6,7,8,9,0},i; for(i=0;i<10;i+=2) fun(c[i],c[i+1]); for(i=0;i<10;i++) printf("%d,",c[i]); printf("\n"); } 程序的运行结果是______。A.1,2,3,4,5,6.7,8,9,0,B.2,1.4.3.6,5.8,7,0,9,C.0,9,8,7,6,5,4,3,2,1,D.0,1,2,3,4,5,6,7,8,9,

有以下程序 include void fun(int a[],int n) { int i,t; for(i=0; 有以下程序 #include <stdio.h> void fun(int a[],int n) { int i,t; for(i=0;i<n/2;i++) {t=a[i]; a[i]=a[n-1-i]; a[n-1-i]=t;} } main() {int k[10]={1,2,3,4,5,6,7,8,9,10},i; fun(k,5); for(i=2;i<8;i++) printf("%d",k[i]); printf("\n"); } 程序的运行结果是______。A.345678B.876543C.1098765D.321678

有以下程序 include define N 4 void fun(int a[][N],int b[]) { int 有以下程序 #include <stdio.h> #define N 4 void fun(int a[][N],int b[]) { int i; for(i=0;i<N;i++) b[i]=a[i][i]; } main() {int x[][N]={{1,2,3},{4},{5,6,7,8},{9,10} },Y[N],i; fun(x,y); for(i=0;i<N;i++) printf("%d,",y[i]); printf("\n"); } 程序的运行结果是______。A.1,2,3,4,B.1,0,7,0,C.1,4,5,9,D.3,4,8,10,

以下程序运行后的输出结果是( )。 include main() {char ch[]="abcd",x[4][4];int i; f 以下程序运行后的输出结果是( )。 include<string.h> main() {char ch[]="abcd",x[4][4];int i; for(i=0;i<4;i++)strcpy(x[i],ch); for(i=0;i<4;i++)printf("%s",x[i][i]); printf("\n"); }

有以下程序,程序执行后,输出结果是【】include void fun(int*A) {a[0]=a[1];} main() {i 有以下程序,程序执行后,输出结果是【 】include<stdio.h>void fun(int*A){ a[0]=a[1];}main(){ int a[10]={10,9,8,7,6,5,4,3,2,1,},i;for(i=2;i>1=0;i-) fun(a[i]);for(i=0;i<10;i++) printf("%d,a[i]);printf("\n");}

有以下程序:includedefine N 8void fun(int*x,int i){*x=*(x+i)+1;}main(){int a[N]= 有以下程序: #include<stdio.h> #define N 8 void fun(int*x,int i) {*x=*(x+i)+1;} main() {int a[N]={1,2,3,4,5,6,7,8},i; fun(a,2); for(i=0;i<N/2;i++) {printf("%d",a[i]);} printf("\n"); } 程序运行后的输出结果是( )。A.1 3 1 3B.3 2 3 4C.4 2 3 4D.1 2 3 4

下列给定程序中,函数fun()的功能是:用冒泡法对6个字符串按由大到小的顺序进行排序。请改正程序中的错误,使它能得到正确结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。试题程序:include <conio.h>include <stdio.h>define MAXLINE 20void fun(char *pstr[6]){int i,j;char *p;for(i=0;i<5;i++)for(j=i+1;j<6;j++)/*************found*************/if(strcmp((pstr+i),(pstr+j))<0){p=*(pstr+i);*(pstr+i)=*(pstr+j);/*************found*************/*(pstr+j)=*p;}}main(){int i;char*pstr[6],str[6][MAXLINE];clrscr();for(i=0;i<6;i++)pstr[i]=str[i];printf("/nEnter 6 string(1 string at each line):\n");for(i=0;i<6;i++)scanf("%s",pstr[i]);fun(pstr);printf("The strings after sorting:\n");for(i=0;i<6;i++)printf("%s\n",pstr[i]);}

有以下程序: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 using namespace std;void fun(int i,int j){ cout 有以下程序: #include <iostream> using namespace std; void fun(int i,int j) { cout<<(i+j)<<end1; } void fun(int i) { cout<<i++<<end1; } int main() { int a=1; fun(A) ; return 0; } 该程序执行后的输出结果是( )。A.1B.2C.3D.4

若有以下程序 include int a[ ]={2,4,6,8}; main( ) { int i; int *p=a; for(i=0;i 若有以下程序#include <stdio.h>int a[ ]={2,4,6,8};main( ){ int i;int *p=a;for(i=0;i<4;i++) a[i]=*p;printf("%d\n",a[2]);}上面程序的输出结果是A.6B.8C.4D.2

有以下程序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 void fun(char(*p)[6]){ int i; for(i=0;i4;i++)printf("%c",p[i][i]); printf("");}main(){ char s[6][6]={"ABCD","abcde","12345","FGHIJ","fghij","54321"}; fun(s);}程序的运行结果是(  )。AAa1FBAb3ICABCDDfghij

单选题有以下程序:#include main(){  char *s[6]={ABCD,EFGH,IJKL,MNOP,QRST,UVWX},**p; int i; p=s;  for(i=0;i4;i++)printf(%s,p[i]); printf();}程序运行后的输出结果是(  )。AABCDEFGHIJKLMNOPBABCDEFGHHKLCABCDDAEIM