单选题有以下程序  fun(Char p[][10])     {int n=O,i;  for(i=O;i7;i++)  if(p[i][O]==’T’)n++;         return n;      }  main( )   {Char str[][10]={”Mon”,”Tue”,”Wed”,”Thu”,”Fri”,”Sat”,”Sun”};      printf(”%d/n”,fun(str));      }  程序执行后的输出结果是()AOB1C2D3

单选题
有以下程序  fun(Char p[][10])     {int n=O,i;  for(i=O;i<7;i++)  if(p[i][O]==’T’)n++;         return n;      }  main( )   {Char str[][10]={”Mon”,”Tue”,”Wed”,”Thu”,”Fri”,”Sat”,”Sun”};      printf(”%d/n”,fun(str));      }  程序执行后的输出结果是()
A

O

B

1

C

2

D

3


参考解析

解析: 暂无解析

相关考题:

有以下程序#include stdio.hvoid fun(int a[], int n){ int i,t;for(i=0;in/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;i8;i++) printf("%d",k[i]);printf("\n");}程序的运行结果是A)345678B)876543C)1098765D)321678

有以下程序fun(char p[][10]){ int n=0,i;for(i=0;i7;i++)if(p[i][0]=='T')n++;return n;}main(){ char str[][10]={"Mon","Tue","Wed","Thu","Fri","Sat","Sun"};printf(" % d\n",fun(str));}程序执行后的输出结果是A)1B)2C)3D)0

有以下程序:includestdio.hmain( ){ char a[5][10]={one,tw0,three,four,five};int i,j;char t: 、for(i=0;i4;i++)for(j=i+1;j5;j++)if(a[i][O]a[j][0]){t=a[i][O];a[i][O]=a[j][O];a[j][O]=t;)puts(a[1]);}程序运行后的输出结果是( )。A.fwoB.fixC.twoD.owo

有以下程序:includevoid f(char p[][10],int n)/* 字符串从小到大排序*/{char t[10]; 有以下程序: #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([i],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

若有以下程序: include using namespace std; class sample { int x; public: sample 若有以下程序:include <iostream>using namespace std;class sample{int x;public:sample(){}void setx(int i){x=i;}friend iht fun(sample B[],int n){int m=0;for{int i=0;i<n;i++)if(B[i].x>m)m=B[i].x;return.m;}};int main ( ){sample A[10];int arr[]={90,87,42,78,97,84,60,55,78,65};for(int i=O;i<10;i++)A[i].setx(arr[i]);cout<<fun(A, 10)<<end1;return 0;}该程序运行后的输出结果是【 】。

请补充函数fun(),该函数的功能是:分类统计一个字符串中元音字母和其他字符的个数(不区分大小写)。例如,输入aeiouAOUpqn,结果为A∶2 E∶1 1∶1 O∶2 U∶2 Other∶4。注意:部分源程序给出如下。请勿改动主函数main和其他函数中的任何内容,仅在函数fun()的横线上填入所编写的若干表达式或语句。试题程序:include<stdiO.h>include<conio.h>define N 100void fun(char *str,int bb[ ]){char *p=str;int i=0;for(i=0;i<6;i++)【 】;while(*p){switch(*p){case 'A':case 'a':bb[0]++;break;case 'E':case 'e':bb[1]++;break;case 'I':case 'i':bb[2]++;break;case 'O':case 'o':bb[3]++;break;case 'U':case 'u':bb[4]++;break;default:【 】;}【 】}}main(){char str[N),ss[6]="AEIOU";int i;int bb[6];clrscr();printf("Input a string:\n");gets(str);printf("the string is:\n");puts(str);fun(str,bb);for(i=0;i<5;i++)printf("\n%c:%d",ss[i],bb[i]);printf("\nother:%d",bb[i]);}

以下程序的运行结果是______。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",);}

若有以下程序:includeusing namespace std;class sample{private: int x;public: sam 若有以下程序: #include <iostream> using namespace std; class sample { private: int x; public: sample() { } void setx(int i) { x=i; } friend int fun(sample B[],int n) { int m=O; for (int i=O; i<n; i++) { if(B[i].x>m) m=B [i].x; } return m; } }; int main ( ) { sample A[10]; int arr[]={90,87,42,78,97,84,60,55,78,65}; for (int i=O;i<10;i++) A[i]. setx (arr[i]); cout<<fun(A, 10)<<end1; return 0; } 该程序运行后的输出结果是( )。A.97B.84C.90D.78

有以下函数void prt(char ch,int n){int i;for(i=1,i=n;i++)printf(i%6 !=O?“%c”:“%c\n”,ch);}执行调用语句prt(’*’,24);后,函数共输出 行*号。

有以下程序 #define N 20 fun(int a[],int n,int m) { int i,j; for(i=m;i>=n;i--) a[i+1]=a[i]; } main() { int i,a[N]={1,2,3,4,5,6,7,8,9,10}; fun(a,2,9); for(i=0;i<5;i++) printf("%d",a[i]); } 程序运行后的输出结果是——。A.10234B.12344C.12334D.12234

有以下程序:include using namespace std;int main ( ){ int n[3],i,j,k = 2; for(i 有以下程序: #include <iostream> using namespace std; int main ( ) { int n[3],i,j,k = 2; for(i = 0;i<k;i++) n[i] = O; for(i = O;i<k;i++) { for(j = O;j<k;j++) n[j] = n[i] + 1; } cout<<n [0 ] <<end1; return 0; } 上述程序运行后,输出结果是( )。A.0B.1C.2D.3

有以下程序: # define N 20 fun(int a[], int n, int m) { int i, j; for(i=m; i>=n; i--)a[i+1]=a[i]; } main() { int i, a[N]={1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; fun(a, 2, 9); for(i=0; i<5; i++)printf("% d", a[i]); } 程序运行后的输出结果是______。A.10234B.12344C.12334D.12234

有以下程序fun(int *a,int n) { int i,j=0,p; p=j; for(i=j;in;i++) if(a[i]a[p]) ____; return(p);}在下画线处应填入的是A.i=p B.a[p]=a[i] C.p=j D.p=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

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

下列程序的输出结果是______。 char*fun(char*str,int n) { int i; char*p=str; for(i=0;i<10;i++,str++) *str='a'+i; return++p; } main() { char a[10]; printf("%s\n",fun(a,10)); }A.ABCDEFGHIJB.abcdefghijC.bcdefghijD.不确定的值

有以下程序 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 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");}

有以下程序 fun(char p[][10]) {int n=0,i; for(i=O;i<7;i++) if(p[i][O]=T)n++; return n; } main() {char str[][10]={"Mon","Tue","Wed","Thu","Fri", "Sat","Sun"}; printf("%d\n",fun(str)); }A.1B.2C.3D.0

有以下程序#define N 15fun(int a[],int n,int m){ int i,j; for(i=m;i=n;i--) a[i+1]=a[i];}main(){ int i,a[N]={1,2,3,4,5,6,7,8,9,10}; fun(a,3,7); for(i=3;i8;i++) printf("%d",a[i]);} 程序的运行结果是A.45678 B.44567 C.45567 D.45677

有以下程序:include fun( char p[] [10]){int n=0,i; for(i=0;i 有以下程序:#include <stdio.h>fun( char p[] [10]){ int n=0,i; for(i=0;i<7;i ++) if(p[i][0] =='T') n++; return n;}main( ){ char sir[] [10] = { "Mon" ,"Tue" ,"Wed" ,"Thu" ,"Fri" ,"Sat" ,"Sun" }; prlnff(" % d\n" ,fun(str) );}程序执行后的输出结果是( )。A.1B.2C.3D.0

有以下程序: #includestdio.h #define N 4 void fun(int a[][N],int[]) { int i; for(i=o;iN;i++)b[i]=a[i][i]-a[i][N-1-i-]}; } main( ) { int x[N][N]={{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16}},y[N],i; fun(X,y); for(i=0;iN;i++)printf("%d,",y[i]);printf("\n"); } 程序运行结果为( )。A.-l2,-3,0,0,B.-3,-l,1,3,C.0,1,2,3,D.-3,-3,-3,-3,

有以下程序: fun(char p[][10]) { int n=0,i; for(i=0;i<7;i++) if(P[i][0]=='T')n++; return n; } main() {char str[][10]={"Mon","Tue","wed","Thu","Fri","Sat","Sun"}; printf("%d\n",fun(str)); } 程序执行后的输出结果是( )。A.1B.2C.3D.0

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

有以下程序  fun(Char p[][10])     {int n=O,i;  for(i=O;i7;i++)  if(p[i][O]==’T’)n++;         return n;      }  main( )   {Char str[][10]={”Mon”,”Tue”,”Wed”,”Thu”,”Fri”,”Sat”,”Sun”};      printf(”%d/n”,fun(str));      }  程序执行后的输出结果是()A、OB、1C、2D、3

单选题有以下程序:#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