有以下程序 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.5D.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.21
B.5
C.5
D.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 *);
intFunc(int,int);不可与下列哪个函数构成重载() A、intFunc(int,int,int);B、doubleFunc(int,int);C、doubleFunc(double,double);D、doubleFunc(int,double);
若有以下函数首部: 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 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 fun(double x[lO],int *n) 则下面针对此函数的函数声明语句中正确的是______。A.int fun(double x, int *n);B.int fun(double, int);C.int fun(double *x, int n);D.iht fun(double*,int*);
若有以下函数首部 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 fun(double x[10],int*n)则下面针对此函数的函数声明语句中正确的是( )。A.int fun(double,int);B.int fun(double木,int*);C.int mn(double*x,int n);D.int fun(double x,intint*n)
若主函数有变量定义:int x=1 ; double y=2.3 ; 且有合法的函数调用语句f (y , x); 则下列关于函数f的原型声明中一定错误的是 。A.void f(double, int);B.int f(int , int);C.int f(double, double);D.void f(double, int, int);
变量dx、dy和dz的声明如下: double dx = (double) x; double dy = (double) y; double dz = (double) z; 已知float和double分别采用IEEE 754单精度和双精度浮点数格式,sizeof(int)=4,对于任意int型变量x、y和z,以下哪些C语言关系表达式是非永真的?A.dx*dx >= 0B.(double)(float) x == dxC.dx+dy == (double) (x+y)D.(dx+dy)+dz == dx+(dy+dz)E.dx*dy*dz == dz*dy*dxF.dx/dx == dy/dy
变量dx、dy和dz的声明和初始化如下: double dx = (double) x; double dy = (double) y; double dz = (double) z; 若float和double分别采用IEEE 754单精度和双精度浮点数格式,sizeof(int)=4,则对于任意int型变量x、y和z,以下哪个关系表达式是永真的?A.dx*dx >= 0B.(double)(float) x == dxC.dx+dy == (double) (x+y)D.(dx+dy)+dz == dx+(dy+dz)E.dx*dy*dz == dz*dy*dxF.dx/dx == dy/dy