有下列程序: #includestdi0.h intfun(int(*s)[4],intn,intk) {intm,i; m=s[O][k]; for(i=1;in;i++)if(s[i][k]m)m=s[i] [k]; returnm; } voidmain( ) {inta[4][4]=({1,2,3,4),{11,12,13,14},{21, 22,23,24},{31,32,33,34)}; printf(”%d\n”,fun(a,4,O)); } 程序的运行结果是( )。A.4B.34C.31D.32
有下列程序: #include<stdi0.h> intfun(int(*s)[4],intn,intk) {intm,i; m=s[O][k]; for(i=1;i<n;i++)if(s[i][k]>m)m=s[i] [k]; returnm; } voidmain( ) {inta[4][4]=({1,2,3,4),{11,12,13,14},{21, 22,23,24},{31,32,33,34)}; printf(”%d\n”,fun(a,4,O)); } 程序的运行结果是( )。
A.4
B.34
C.31
D.32
相关考题:
有以下程序#include stdio.hint fun(int (*s)[4],int n, int k){ int m,i;m=s[0][k];for(i=1;in;i++) if(s[i][k]m)m= s[i][k];return m;}main(){ int a[4][4]={{1,2,3,4},{11,12,13,14},{21,22,23,24},{31,32,33,34}};printf("%d\n",fun(a,4,0));}程序的运行结果是A)4B)34C)31D)32
有下列程序:includestdi0.hintfun(int(*s)[4],intn,intk){intm,i;m=s[O][k];for(i=1;i<n;i++)if(s[i][k]m)m=s[i][k];returnm;}voidmain( ){inta[4][4]=({1,2,3,4),{11,12,13,14},{21,22,23,24},{31,32,33,34)};printf(”%d\n”,fun(a,4,O));}程序的运行结果是( )。A.4B.34C.31D.32
有以下程序: include using namespace std; constxntN=5; int fun(char*s,char a,int 有以下程序:include <iostream>using namespace std;const xnt N=5;int fun(char *s,char a,int n){int j;*s=a;j=n;while(a<s[j])j--;return j;}int main(){char s[N+1];int k;
以下程序的输出结果是【 】。include defineN 5 int fun(int *s,int a,int n) {int j; *s= 以下程序的输出结果是【 】。include <stdio.h>define N 5int fun(int *s,int a,int n){ int j;*s=a j=n;while(a!=s[j]) j-;return j;main(){ int s[N+1]; int k:for(k=1 ;k<=N;k++) s[k]=k+1:print f("%d\n",fun(s,4,N));}
阅读下面程序: include int fun2(int m) { if(m%3==0) return 1; else return 0; } 阅读下面程序:include <iostream.h>int fun2(int m){if(m%3==0)return 1;elsereturn 0;}void fun1(int m, int s){int i;for (i=1; i<m; i++)if(fun2(i))S=S*i;}void main(){int n=9, s=2;fun1(n, s);cout<<s<<end1;}该程序的运行结果是【 】。
有以下程序#include stdio.hint fun(int (*s)[4],int n, int k){ int m, i; m=s[0][k]; for(i=l; in; i++) if(s[i][k]m) m=s[i][k]; return m;}main(){ int a[4][4]={{1,2,3,4},{11,12,13,14},{2l,22,23,24},{31,32,33,34}}; printf("%d\n", fun(a,4,0));}程序的运行结果是A.4 B.34C.31 D.32
有以下程序 include int fun(int (*s)[4],int n,int k) {int m,i; 有以下程序 #include <stdio.h> int fun(int (*s)[4],int n,int k) {int m,i; m=s[0][kl; for(i=1;i<n;i++) if(s[i][k]>m) m=s[i][k]; return m; } main() { int a[4][4]={{1,2,3,4},{11,12,13,14}, {21,22,23,24}, {31,32,33,34}}; printf("%d\n",fun(a,4,0)); } 程序的运行结果是______。A.4B.34C.31D.32
有下列程序: include void fun(int * s,int n1,int n2) { int i,j, 有下列程序: #include <stdio.h> void fun(int * s,int n1,int n2) { int i,j,t; i=n1;j=n2; while(i<j){t=s[i];s[i]=s[j];s[j]=t;i++;j--;} } main() { int a[10]={1,2,3,4,5,6,7,8,9,0},k; fun(a,0,3); fun(a,4,9);fun(a,0,9); for(k=0;k<10;k++)printf("%d",a[k]);printf("\n"); } 程序的运行结果是( )。A.987654321B.4321098765C.5678901234D.987651234
假定n=3,,下列程序的运行结果是()。includeint Fun(int m)void main(){cout 假定n=3,,下列程序的运行结果是( )。 #include<iostream.h> int Fun(int m) void main() { cout<<"Please input a number:"; int n,s=0; cin>>n; s=Fun(n); cout<<s<<endl; } int Fun(int m) { iht p=1,s=0; for (int I=1;I<=m;I++) { p*=I; S+=p; } return s; }A.7B.9C.8D.10