有以下程序#include [stdio.h]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);}int main(){double w;w=fun2(1.1,2.0); return 0; }程序执行后变量w中的值是( ).
A: 5
B: 5.21
C: 0
D: 10.21
A: 5
B: 5.21
C: 0
D: 10.21
举一反三
- 有以下程序#include <stdio.h>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);}int main(){double w;w=fun2(1.1,2.0); return 0; }程序执行后变量w中的值是( ). A: 5 B: 5.21 C: 0 D: 10.21
- 有以下程序:int 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);}int main(){double w; w=fun2(1.1,2.0); …}程序执行后变量w中的值是(). A: 5.21 B: 50 C: 5 D: 0
- 有以下程序: #include<stdio.h> int fun1(double a) return a*=a; int fun2(double x, double y) double a=O, b=0; a=funl(x); b=fun1(y); return (int) (a+b); main() double w; w=fun2(1.1, 2.0); ……) 程序执行后变量w中的值是( )。 A: A) 5.21 B: B) 5 C: C) 5.0 D: D) 0.0
- 有以下程序:int fun1 (double A: return a * =a; B: int fun2 ( double x, double y ) C: double a=0,b=0; D: a = fun1 (x) ;b = fun1 (y); return(int) (a + E: ; F: &nbs
- 以下正确的函数定义是() A: double fun(int x,int y) {z=x+y;return z;} B: double fun(int x,y) {int z;return z;} C: fun(x,y) {double z; z=x+y;return z;} D: double fun(int x,int y) {double z; return z;}