[单选题]

有以下程序; int f1(double A) { return a*a; } int f2(double x,double y) { double a, b; a=n(x); b=f1(y); return a+b; } main() { double w; w=f2(1.1,2.0); ┇ } 变量w中的值是( )

A.5.21

B.5

C.5

D.0

参考答案与解析:

相关试题

有以下程序:int f1(doubleA){return a*a;}int f2

[单选题]有以下程序: int f1(doubleA){return a*a;} int f2(int x,int y) {double a,b; a=f1(x); b=f1(y); return a+b; } main() {double w; w=f2(2.1,4.0); } 程序执行后,变量w的值是( )。A.20.21B.20C.20.0D.0.0

  • 查看答案
  • 以下程序的运行结果为______。main(){int i,f1,f2; f1=

    [单选题]以下程序的运行结果为______。main(){ int i,f1,f2; f1=f2=1; for(i=0;i<4;i++) { printf("%d %d",f1,f2); f1+=f2; f2+=f1; }}A.1 1 2 3 5 8 13 21B.1 1 2 2 5 5 10 10C.1 2 5 8 9 8 13 21D.0 1 1 2 4 5 15 21

  • 查看答案
  • 有以下程序int f (intA){returna%2; }main ( ){

    [单选题]有以下程序 int f (int A) { return a%2; } main ( ) { int s[8]={1,3,5,2,4,6),i,d=0; for (i=0; f(s[i]; i++) d +=s[i]; print f ("%d/n", D) ; } 程序运行后的输出结果是A.9B.11C.19D.21

  • 查看答案
  • 下面程序的输出结果是 ( ) main( ) { int i,f1,f2; f1

    [单选题]下面程序的输出结果是 ( ) main( ) { int i,f1,f2; f1=f2=1; for(i=0;i<4;i+ +) { printf(”%d%d”,f1,f2); f1+ =f2; f2+ =f1; } }A.1 2 3 4 5 6 7 8B.1 1 2 3 5 8 13 21C.1 1 3 5 7 9 11 13D.1 3 5 7 9 11 13 15

  • 查看答案
  • 有以下程序int f(inta){returna%2; }main(){ints

    [单选题]有以下程序 int f(int a) { return a%2; } main() { int s[8]={1,3;5,2,4,6},i,d=0; for(i=0;f(s[i]);i++)d+=s[i]; printf("%d/n",d) ; } 程序运行后的输出结果是A.9B.11C.19D.21

  • 查看答案
  • 有如下头文件: int f1(); static int f2(); class

    [单选题]有如下头文件: int f1(); static int f2(); class MA{ public: int f3(); static int f4(); };在所描述的函数中,具有隐含的this指针的是A.f1B.f2C.f3D.f4

  • 查看答案
  • 有如下头文件:int f1( );static int f2( );class

    [单选题]有如下头文件: int f1( ); static int f2( ); class MA{ public: int f3( ); static int f4( ); }; 在所描述的函数中,具有隐含的this指针的是A.f1B.f2C.f3D.f4

  • 查看答案
  • 有以下程序: main( ) int f1 (int x, int y) { r

    [单选题]有以下程序: main( ) int f1 (int x, int y) { return x>y?x:y; } int f2 (int x, int y) { return x>y?y:x; } main( ) { int a=4,b=3,c=5,d,e,f; d=f1(a,b); d=f1(d,c); e=f2(a,b); e=f2(e,c); f=a+b+c-d-e; printf("%d,%d,%d/n",d,f,e); } 执行后输出的结果是A.3,4,5B.5,3,4C.5,4,

  • 查看答案
  • 有以下程序A:int f1(int x,int y){return x>y?x:

    [单选题]有以下程序A: int f1(int x,int y) { return x>y?x:y; } int f2(int x,int y) { return x>y?y:x; ) main() { int a=4,b=3,c=5,d=2,e,f,g; e=f2(f1(a,B),f1(c,D));f=f1(f2(a,B),f2(c,D)); g=a+b+c+d-e-f; printf("%d,%d,%d/n",e,f,g); } 程序运行后的输出结果是( )。A.4,3,7B.3,4,7C.5,2

  • 查看答案
  • 有以下程序 int f1(int x,int y) {return x>y? x

    [单选题]有以下程序int f1(int x,int y){ return x>y? x:y;}int f2(int x,int y){ return x>y? y:x;}main( ){ int a=4,b=3,c=5,d,e,f;d=f1(a,b);d=f1(d,c);e=f2(a,b);e=f2(e,c);f=a+b+c-d-e;cout<<d<<","<<f<<","<<e<<endl;}执行后输出结果是A.3,4,5B.5,3,4C.5,4,3D.3,5,4

  • 查看答案
  • 有以下程序;int f1(doubleA){ returna*a;}int f2