网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

4、以下程序运行后的输出结果是【 】。 fun(int a, int b) { if(a>b) return a; else return b; } main() { int x=3,y=8,z=6,r; r=fun(fun(x,y),2*z); printf("%d\n",r); }

A.3

B.6

C.8

D.12


参考答案和解析
0 10 1 11 2 12 010111212
更多 “4、以下程序运行后的输出结果是【 】。 fun(int a, int b) { if(a>b) return a; else return b; } main() { int x=3,y=8,z=6,r; r=fun(fun(x,y),2*z); printf("%d\n",r); }A.3B.6C.8D.12” 相关考题
考题 以下程序的输出结果是 【 17 】 。int fun(int *x,int n){ if(n==0) return x[0];else return x[0]+fun(x+1,n-1);}main( ){ int a[]={1,2,3,4,5,6,7}; printf("%d\n",fun(a,3));}

考题 有以下程序#include stdio.hint fun(int x,int y){ if(x==y) return (x);else return((x+y)/2);}main(){ int a=4,b=5,c=6;printf("%d\n",fun(2*a,fun(b,c)));}程序运行后的输出结果是A)3B)6C)8D)12

考题 写出下列程序的运行结果。 fun(int a, int b) { if(ab) return (a); Else return (b); } main { int x=3,y=8,z=6,r; r=fun(fun(x,y),2*z); printf(“%d\n”,r); }

考题 有以下程序:fun(int a,int b){ a++;b++;if(ab) return(a);else return(b);}voidmain(){ int x=3,y=8,z=6,r; r=fun(fun(x,y++),2*z); printf("%d\n",r);}程序运行后的输出结果是( )。A.13 B.6C.8 D.12

考题 有以下程序fun(int x,int y,int z){ z=x*y;}main(){int a=4,b=2,c=6;fun(a,b,c);printf("%d",c);}程序运行后的输出结果是A.16B.6C.8D.12

考题 (33)有以下程序#include stdio.hint fun{int x,int y}{ if(x==y) return(x);else return((x+y)/2)}main(){ int a=4,b=5,c=6;printf(“%d\n”,fun(2*a,fun(b,c)))}程序运行后的输出结果是A)3 B)6 C)8 D)12

考题 有以下程序: fun (iht a,int b) { if(a>b)return(a); else return(b); } main() { int x=3,y=8,z=6,r; r=fun(fun(x,y),2*z); printf("%d\n",r); } 程序运行后的输出结果是( )。A.3B.6C.8D.12

考题 以下程序的输出结果是 【10】 。fun (int x,int y,int z){ z =x*x+y*y;}main (){int a=31;fun (6,3,a)printf ("%d", a)}

考题 有以下程序:includefun(int a, int b){if(a>b) return(a); elsereturn(b);}main(){int 有以下程序: #include <stdio.h> fun(int a, int b) { if(a>b) return(a); else return(b); } main() { int x=3,y=8,z=6,r; r=fun(fun(x,y),2*z); printf("%d\n",r); } 程序运行后的输出结果是( )。A.3B.6C.8D.12

考题 有以下程序fun(int a, int b){ if(ab) return(a);else return(b);}main( ){ int x=3, y=8, z=6, r;r=fun(fun(x,y), 2*z);printf("%d\n", r);}程序运行后的输出结果是A.3B.6C.8D.12

考题 以下程序的输出结果是______。fun(int x,inty,int z){ z=x*x+y*y;}main(){ int a=31;fun(6,3,a)printf("%d",a)}

考题 有如下程序:includeusing namespace std;int fun(int a, int b){return(++a*b++);}vo 有如下程序: #include<iostream> using namespace std; int fun(int a, int b) {return(++a*b++);} void main() { int x=3,y=4,z=5,r; r=fun (fun (x,y),z); cout<<r>>endl; cout<<x<<endl; cout<<y<<endl; } 该程序的输出的结果是( )。A.85 3 4B.60 3 4C.126 4 5D.85 4 5

考题 若有程序: fun(int a,int b) { static int c=0; c+=a+b: return c; } main() { int x=5,y=3,z=7,r; r=fun((y,x+y),z); r=fun(x,y); printf("%d\n",r); } 上面程序的输出结果是______。A.23B.15C.19D.18

考题 若有程序 fun(int a,int b) { static int c=0 c+=a+b; retum c; } main () { int x=5,y=3,z=7,r; r=fun((y,x+y),z); r=fun(x,y); printf("%d\n",r); } 上面程序的输出结果______。A.23B.15C.19D.18

考题 有以下程序 fun(int a,int b) { if(a>b) return(a) ; else return(b) ; } main() { int x=3,y=8,z=6,r; r=fun(fun(x,y),2*z); Printf("%d\n",r); } 程序运行后的输出结果是A.3B.6C.8D.12

考题 有以下程序includeint fun(int x;int y){if(x=y)reurn(x); elsereturn((x+y)/2);}main 有以下程序 #include<stdio.h> int fun(int x;int y) { if(x=y)reurn(x); else return((x+y)/2); } main() { int a=4,b=5,c=6; printf("%d\n",fun(2*a,fun(b,c))); } 程序运行后的输出结果是______。A.3B.6C.8D.12

考题 有以下程序: #includestdio.h int fun(int X,int y) {if(X!=y)return((x+y)/2); else return(x); } main( ) {int a=4,b=5,c=6; printf("%d/n",fun(2*a,fun(b,c))); } 程序运行后的输入结果是( )。A.3B.6C.8D.12

考题 有以下程序:includeint fun(int x,int y){if(x!=y)return(y);else return((x+y)/2);}ma 有以下程序: #include<stdioh> int fun(int x,int y) {if(x!=y)return(y); else return((x+y)/2); } main() {int a=4,b=5,c=6; printf("%d\n",fun(2*a,fun(b,C))); } 程序运行后的输出结果是( )。A.3B.6C.8D.12

考题 有以下程序:includeint fun(int x,int y){if(x==y)return(x);else return((x+y)/2);}m 有以下程序: #include<stdio.h> int fun(int x,int y) {if(x==y)return(x); else return((x+y)/2); } main() {int a=1,b=2,c=3; printf("%d\n",fun(2*a,fun(b,C))); } 程序运行后的输出结果是( )。A.2B.3C.4D.5

考题 若有程序 fun(int a,int b} { static int c=0; c+=a+b; return c; } main() { int x=5,y=3,z=7,r, r=fun(y,x+y),z); r=fun(xy); printf("%d\n",r); } 上面程序的输出结果是_____。A.23B.15C.19D.18

考题 阅读下面程序:include fun (int a, int b){int c;c=a+b;return c;}void main(){int 阅读下面程序:#include <iostream.h>fun (int a, int b){int c;c=a+b;return c;}void main(){int x=6, y=7, z=8, r;r=fun( (x--, y++, x+y), z--);cout<<r<<end1;}则该程序的输出结果是( )。A.11B.20C.21D.31

考题 阅读下面程序:includefun(int a,int b){int c;c=a+b;return c;}void main(){int x= 阅读下面程序: #include<iostream.h> fun(int a,int b) { int c; c=a+b; return c; } void main() { int x=6,y=7,z=8,r; r=fun((x--,y++,x+y),z--); cout<<r<<endl; } 则该程序的输出结果是( )。A.11B.20C.21D.31

考题 若有程序 fun(int a,int b) { static int c=0; c+=a+b; rerurn c; } main() { int x=5,y=3,z=7,r; r=fun(y,x+y),z); r=fun(x,y); printf("%d\n",r); } 上面程序的输出结果是______。A.23B.15C.19D.18

考题 有以下程序:includefun(int x,int y,int z){z=x*y;}main(){int a=4,b=2,c=6; fun(a,b, 有以下程序: #include <stdio.h> fun(int x,int y,int z) { z=x*y;} main() { int a=4,b=2,c=6; fun(a,b,c); printf("%d",c); } 程序运行后的输出结果是( )。A.16B.6C.8D.12

考题 若有程序fun(int a, int b){ static int c=0; c+=a+ b; returm c;}main(){ int x=5,y=3,z=7,r; r=fun((y, x+ y),z); r=fun (x, y); printf("%d\n", r);}A.23B.15C.19D.18

考题 (33)有以下程序#include stdio.hint fun (int x,int y){ if (x!=y) return ((x+y);2);else return (x);}main(){ int a=4,b=5,c=6;printf("%d\n",fun(2*a,fun(b,c)));}程序运行后的输出结果是A)3B)6C)8D)12

考题 单选题有以下程序:#include int fun(int x,int y){ if(x==y)return(x); else return((x+y)/2);}main(){ int a=4,b=5,c=6; printf(%d,fun(2*a,fun(b,c)));}程序运行后的输出结果是(  )。A 3B 6C 8D 12

考题 单选题有以下程序#includeint fun(int a,int b){ return a+b;}main(){ int x = 6,y=7,z = 8,r; r = fun(fun(x,y),z--); printf(%d,r);}程序运行后的输出结果是(  )。A 15B 21C 20D 31