执行下列程序后的输出结果是( ) int fun(int x1,int x2) { int x;x1x2?(x=3):(x=4);return(x+x1); } main() { printf("%d\n",fun( 7,8));}A.9B.10C.11D.12

执行下列程序后的输出结果是( ) int fun(int x1,int x2) { int x;x1>x2?(x=3):(x=4);return(x+x1); } main() { printf("%d\n",fun( 7,8));}

A.9

B.10

C.11

D.12


相关考题:

如下程序的输出结果是______。 include using namespace std; int funl(int x){retu 如下程序的输出结果是______。include<iostream>using namespace std;int funl(int x){return++x;}int fun2(int&x){return++x;}int main( ){int x:1,y=2;Y=funl(fun2(x));cout<<x<<','<<y;return 0;}

以下程序输出结果为______。 include using namespace std; class TestClass 1 { publi 以下程序输出结果为______。include<iostream>using namespace std;class TestClass 1{public:TestClass1(){}TestClass1(int i){x1=i;}void dispa(){cout<<"x1="<<x1<<",";}private:int x1;}:class TestClass2:public TestClass1{public:TestClass2(){}TestClass2(int i):TestClass1(i+10){x2=i:}void dispb(){dispa();cout<<"x2="<<x2<<end1;}private:int x2:}:int main(){TestClass2 b(2):b.dispb();return 0;}

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

下列程序的输出结果是()。includevoid main(){char*str=”12123434”;int x1=0,x2=0,x 下列程序的输出结果是( )。 #include<iostream.h> void main() {char*str=”12123434”; int x1=0,x2=0,x3=0,x4=0,i; for(i=0;str[i]!=’\0’;i++) switch(str[i]) {case’1’:x4++; case’2’:x3++; case’3’:x2++; case’4’:xl++; ) cout<<xl<<“,”<<x2<<A.8,6,4,1B.8,6,3,2C.8,8,4,lD.8,6,4,2

以下程序的输出结果是 【11】 。int fun(int x,int y,int *p,int *q){ *p=x*y;*q=x/y;}main(){int a,b,c,d;a=4;b=3;fun(a,b,c,d);printf("%d,%d\n",c,d);}

以下程序运行后的输出结果是【】。 include void fun(int x,int y) {x=x+y;y=x-y 以下程序运行后的输出结果是【 】。include<iostream.h>void fun(int x,int y){ x=x+y;y=x-y;x=x-y;cout<< x << "," <<y << " ,";}void main( ){ int x=2,y=3;fun(x,y);cout<< x << "," << y << endl;}

下列程序的输出结果是()。 include int fun(int x) {int a; if(x==0‖x==1) return 3; 下列程序的输出结果是( )。#include<stdio.h>int fun(int x){ int a;if(x==0‖x==1)return 3;elsea=x-fun(x-2) ;return a;}void main(){ printf("%d",fun(7) );}A.2B.8C.9D.5

下列程序的输出结果是()。 include int fun(int x) {int a;if(x==0‖x==1) return 3;els 下列程序的输出结果是( )。 #include<stdio.h> int fun(int x) { int a; if(x==0‖x==1) return 3; else a=x-fun(x-2); return a; } void main() { printf("%d",fun(7)); }A.2B.8C.9D.5

执行下列程序 int fun(int x1,int x2){ int x; x1>x2 ?(x=3):(x=4); return x+x1; } void main(){ cout<<fun(7,8); } 后输出结果是 ______。A.9B.10C.11D.12

下面程序的输出结果是()。includeint m=13;int fun2(int x,int y){int m=3; return(x*y 下面程序的输出结果是( )。 #include <stdio.h> int m=13; int fun2(int x,int y) { int m=3; return(x*y-m); } main() { int a=7,b=5; printf("%d\n",fun2(a,b)/m); }A.1B.2C.7D.10

下列程序输出结果为: include using namespace std; class TestClass1 { public: Test 下列程序输出结果为:include<iostream>using namespace std;class TestClass1{public:TestClass1(){}TestClass1(int i){x1=i;}void dispa(){cout<<"x1="<<x1<<",";}private:int x1;};class TestClass2:public TestClass1{public:TestClass2(){}TestClass2(int i):TestClass1(i+10){x2=i;}void dispb(){dispa();cout<<"x2="<<x2<<endl;}private:int x2;};int main(){TestClass2 b(2);b.dispb();return 0;}

以下程序的输出结果是()。includeint m=13;int fun(int x,int y){int m=2;return(x*y-m 以下程序的输出结果是( )。 #include<stdio.h> int m=13; int fun(int x,int y) {int m=2; return(x*y-m); } main() {int a=7,b=6; printf("%d",fun(a,B)/m); }A.1B.3C.7D.10

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

下列程序段的输出结果是includevoid fun(int * x,int * y){cout 下列程序段的输出结果是 #include<iostream.h> void fun(int * x,int * y) { cout << * X << * y; *X=3; *y=4; } void main() { int x=1,y=2; fun(y,x); cout << X << y<<endl; {A.2143B.1212C.1234D.2112

以下程序输出结果是 ______。includevoid fun(int x,int y,int z){z=x+y;}void main 以下程序输出结果是 ______。 #include<iostream.h> void fun(int x,int y,int z){z=x+y;} void main() { int a=10; fun (2,2,a); cout<<a; }A.0B.4C.10D.无定值

下列程序的输出结果是()。includeint fun(int x){int p; if(x==0‖x==1)return 3; elsep 下列程序的输出结果是( )。 #include<stdio.h> int fun(int x) { int p; if(x==0‖x==1) return 3; else p=x-fun(x-2); return p; } void main() { printf("\n%d",fun(5)); }A.5B.3C.7D.1

有如下程序: include class x { protected: int a; public:x(){ a=1;} }; class x 有如下程序: #include <iostream.h> class x { protected: int a; public: x() { a=1; } }; class x1 : virtual public x { public: x1() { a+=1; cout<<a; } }; class x2 : virtual public x { public: x2() { a+=2; cout<<a; } }; class y : public xl,public x2 { public: y() { cout<<a<<end1; } }; int main() { y obj; return O; } 该程序运行后的输出结果是( )。A.1B.123C.242D.244

下列程序的运行结果是()。includeint x=5;int fun(int A) {int C;C=X*a;return C;}v 下列程序的运行结果是( )。 #include<iostream.h> int x=5; int fun(int A) { int C; C=X*a; return C; } void main() { int x=3,a=4; x=x+fun(a); cout<<"x="<<x<<endl; }A.x=15B.x=17C.x=23D.x=25

下列程序的输出结果是()。includeint fun(int x){ int a;if(x==0||x=1)return 3;elsea= 下列程序的输出结果是( )。#include<stdio.h>int fun(int x){ int a; if(x==0||x=1) return 3; else a=x-fun(x-2); return a;}void main(){ printf("%d",fun(7));}A.2B.8C.9D.5

若有以下程序:include using namespaces std;class A{public: A (){} A (int i) {x1= 若有以下程序: #include <iostream> using namespaces std; class A { public: A (){} A (int i) { x1=i; } void dispa() { cout<<"xl="<<xl<<" , "; } private: int x1; }; class B : public A { public: B (){} B (int i):A(i+10) { x2=i; } void dispb() { dispa (); cout <<"x2="<<x2<<end1; } private: int x2; }; int main () { B b(2); b.dispb (): return 0; } 程序运行后的输出结果是( )。A.x1=10,x2=2B.x1=12,x2=10C.x1=12,x2=2D.x1=2,x2=2

下列程序的输出结果是( )。 include int fun(int x) {int p;if(x==0‖x==1) return 3;el 下列程序的输出结果是( )。 #include<stdio.h> int fun(int x) { int p; if(x==0‖x==1) return 3; else p=x-fun(x-2); return p; } void main() { print f("\n%d", fun(5)); }A.5B.3C.7D.1

下列程序运行后的输出结果是()。includevoid fun(int,int,int*);void main(){int x, 下列程序运行后的输出结果是( )。 #include<iostream.h> void fun(int,int,int*); void main() { int x,y,z; fun(5,6,x); fun(7,x,y); fun(x,y,z); cout<<x<<","<<y<<","<<z<<endl; } void fun(int a,int b,int *c) { b+=a; *c=b-a; }A.5,5,5B.6,6,6C.5,6,7D.7,7,7

下列程序段执行后,x5的结果是______。 public class ex42 { public static void main(String[] args) { int xl = 8; int x2 = 12; int x3=7; int x4; int x5; x4 = x1 > x2 ? x1 : x2+ x1; x5 = x4 > x3 ? x4 : x3; System.out.println(x5); } }A.11B.20C.10D.12

若有以下程序:includeusing namespaces std;class A{public:A(){}A(int i){x1=i; } v 若有以下程序: #include<iOStream> using namespaces std; class A { public: A(){} A(int i) { x1=i; } void dispa() { cout<<"X1="<<x1<<",": } private; int x1; }; class B:public A { public: B(){} B(int i):A(i+10) { x2=i; } void dispb() { dispa(); cout<<"x2="<<x2<<end1; } private: int x2; }; . int main() { B b(2); b.dispb() return 0; } 程序运行后的输出结果是( )。A.x1=10,x2=2B.x1=12,x2=10C.x1=12,x2=2D.x1=2,x2=2

下列程序运行后的输出结果是()。 include void fun(int,int,int*); void main() { i 下列程序运行后的输出结果是( )。 #include<iostream.h> void fun(int,int,int*); void main() { int x,y,z; fun(5,6,x); fun(7,x,y); fun(x,y,z); cout<<x<<","<<y<<","<<z<<end1; } void fun(int a,int b,int *c) { b+=a; *c=b-a; }A.5, 5, 5B.6, 6, 6C.5, 6, 7D.7, 7, 7

下列程序段的输出结果是 include void fun(int * X,int * y) {cout 下列程序段的输出结果是 #include<iostream.h> void fun(int * X,int * y) { cout < < * X < < * y; * X=3; * y=4; } void main( ) { int x=1,y=2; fun(y,x); cout < < X < < y < < end1; }A.2143B.1212C.1234D.2112

单选题有以下程序:#includestruct S{int a;int *b;};main(){ int x1[] = {3,4},x2[] = {6,7}; struct S x[] = {1,x1,2,x2}; printf(%d,%d,*x[0].b,*x[1].b);}程序的运行结果是(  )。A1,2B3,6C4,7D变量的地址值