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

题目内容 (请给出正确答案)
单选题
有以下程序 int fun1(double a) { return a*=a; } int fun2(double x,double y) { double a=0,b=0; a=fun1(x); b=fun1(y); return(int)(a+b); } main() { double w; w=fun2(1.1,2.0); } 程序执行后变量w中的值是()
A

5.21

B

5

C

5.0

D

0.0


参考答案

参考解析
解析: 暂无解析
更多 “单选题有以下程序 int fun1(double a) { return a*=a; } int fun2(double x,double y) { double a=0,b=0; a=fun1(x); b=fun1(y); return(int)(a+b); } main() { double w; w=fun2(1.1,2.0); } 程序执行后变量w中的值是()A 5.21B 5C 5.0D 0.0” 相关考题
考题 若有以下函数首部int fun(double x[10], int *n)则下面针对此函数的函数声明语句中正确的是A)int fun(double x, int *n);B)int fun(double , int );C)int fun(double *x, int n);D)int fun(double *, int *);

考题 有以下程序int fun1(double a){return a*=a;}int fun2(double x,double y){ double a=0,b=0;a=fun1(x);b=fun1(y);return(int)(a+b);}main(){ double w; w=fun2(1.1,2.0); …… }程序执行后变量 w 中的值是A)5.21B)5C)5.0D)0.0

考题 以下程序的输出结果是______。 include int add(int x, int y) { return x+y; } doub 以下程序的输出结果是______。include<iostream.h>int add(int x, int y){return x+y;}double add(double x, double y){return x+y;}void main(){int a=3, b=3;double c=6.5, d=1.5;cout<<add(a, b)<<","<<add(c, d)<<end1;}

考题 以下正确的函数头定义形式是A.double fun(int x,int y)B.double fun(int x;int y)C.double fun(int x,int y);D.double fun(int x,y);

考题 以下正确的函数原型语句是( )。A、double fun(int x,int y)B、double fun(int x;int y)C、double fun(int,int);D、double fun(int x,y);

考题 阅读下面程序: 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;}该程序的运行结果是【 】。

考题 以下正确的函数原型语句是(48)。A.double fun(int x,int y);B.double fun(int x;int y);C.double fun(int,int);D.double fun(int x,y);

考题 有以下程序include using namespace std;class sample{private:int x;public:sample( 有以下程序#include <iostream>using namespace std;class sample{private: int x;public: sample(int a) { x=a; } friend double square(sample s);};double square(sample s){ return s. x*s. x;}int main(){ sample s1(20),s2(30); cout<<square(s2)<<end1; return 0;}执行结果是( )。A.20B.30C.900D.400

考题 有以下程序 include typedef struct { int num;double s; }REC; void funl(REC *x) { x 有以下程序 include<stdio.h> typedef struct { int num;double s; }REC; void funl(REC *x) { x->num=23;x->s=88.5; } void main() { REC a={16,90.0}; fun1(A); printf("%d\n",a.num); } 程序运行后的输出结果是( )。

考题 分析以下程序执行结果【】。 include int f (int x, int y){return x,y; } double f (d 分析以下程序执行结果【 】。include<iostream.h>int f (int x, int y){return x,y;}double f (double x, double y) {return x,y;}void main() {int a=4, b=6;double c=2.6, d=7.4;cout<<f (a, b) <<","<<f (c, d) <<end1;}

考题 有下列程序: int funl(double a){return a*=a;} int fun2(double x,double y) {double a=0,b=0; a=funl(x);b=funl(y);return(int)(a+b); } main( ) {double w;w=fun2(1.1,2.0),……} 程序执行后变量w中的值是( )。 、A.5.21B.5C.5.0D.0.0

考题 下列程序运行后的输出结果是( )。#includeusing namespace std;int fun(int x) { return x*x; }double fun(double x,int y=2) { return x*y; }int main(){int a=5;double b= 1.2;cout}A. 27.4B.26.44C. 12.4D.程序有误

考题 有以下程序:int fun1 (double a){ return a * =a;}int fun2 ( double x, double y ){ double a=0,b=0; a = fun1 (x) ;b = fun1 (y); return(int) (a + b);} main() { doublew;w=fun2(1.1,2.0);……} 程序执行后变量w中的值是( )。A.5.21B.5C.5D.0

考题 以下函数的功能是:求x的y次方,请填空。double fun(double x,int y){ int i; double z; for(i=1,z=x;iy;i++) z=z*; return z;}

考题 有以下程序:includeusing namespace std;class sample{private:int x;public:sample( 有以下程序: #include<iostream> using namespace std; class sample { private: int x; public: sample(int A) { x=a; friend double square(sample s); }; double square(sample s) { return S.X*S.K; } int main() { saA.20B.30C.900D.400

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

考题 有以下程序include using namespace std; class sample { private: int x; public: 有以下程序 #include <iostream> using namespace std; class sample { private: int x; public: sample(int a) { x=a; } friend double square(sample s); }; double square(sample s) { return s.x*s.x; } int main() { sample s1 (20),s2(30); cout<<square(s2)<<end1; return 0; } 执行结果是A.20B.30C.900D.400

考题 以下程序的输出结果是【】。 include int add(int x,int y) { retum X+y; } dOuble ad 以下程序的输出结果是【 】。include<iostream.h>int add(int x,int y){retum X+y;}dOuble add(dOUble x,double y){return x+y;}void main(){int a=4,b=6;double c=2.6,d=7.4;cout<<add(a,b)<<",”<<add(C,d)<<endl;}

考题 有以下程序: #includestdio.h double f(double x); main( ) {double a=0; int i; for(i=0;i30;i+=10)a+=f((double)i); printf("%5.of\n",a); } double f(double x) { return x*x+1; } 程序运行后的输出结果是( )。A.503B.401C.500D.1404

考题 有以下程序; 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.21B.5C.5D.0

考题 有以下程序#includestdio.hdouble f(double x);main(){ double a=0;int i;for(i=0;i30;i+=10) a+=f((double)i);printf("%5.0f\n",a);}double f(double x){return x*x*i;}程序运行后的输出结果是A.503B.401C.500D.1404

考题 下列方法定义中,正确的是( )。A.int x(int a,b)B.double x(int a,int b) {return(a-b);){int w:w=a-b:}C.double x(a,b)D.int x (int a,int b) {return b}{return a-b;}

考题 有如下程序: include using namespace std; int fun1(int x) {return++x;} int fun2(i 有如下程序:include<iostream>using namespace std;int fun1(int x) {return++x;}int fun2(int x) {return++x;}int main(){int x=1,y=2;y=fun 1(fun2(x));cout<<X<<','<<y;return 0:}程序的输出结果是______。

考题 以下正确的函数定义形式是()。A、double FUN(int x;int y)B、double FUN(int x,int y)C、double FUN(int x,int y);D、double FUN(int x,y)

考题 在JAVA语言中,以下正确的函数定义形式是()。A、double run(x,y)B、double run(int x;int y)C、double run(int x,int y)D、double run(int x,y)

考题 单选题有以下程序#includeint fun1(double a){ return (int)(a*= a);}int fun2(double x,double y){ double a = 0,b = 0; a = fun1(x); b = fun1(y); return (int)(a+b);}main(){ double w; w = fun2(1.1,2.0); printf(%4.2f,w);}程序执行后输出结果是(  )。A 5B 5.00C 5.21D 0.0

考题 单选题有以下程序:#includefloat fun(double a){ double x; x=a-(int)a; return x;}main(){ double a=3.1415; printf(%f,fun(a));}程序的运行结果是(  )。A 3.000000B 3.141500C 0.141500D 0.000000