有以下程序 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中的值是()
相似题目
-
有以下说明和定义: union dt { int a;char b;double c; } data; 以下叙述中错误的是:
-
给出以下4个重载的方法show,调用show方法时,下面哪个说法是错误的() (1)show(int a ,int b,int c) (2)show(int a ,int b,double c) (3)show(int a ,double b,double c) (4)show(double a,double b,int c)
-
阅读程序写出结果:#include int fun(double a,double b);void main( ){ cout<
-
以下程序执行后变量w的值是________。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);.... }
-
若有以下定义:| char a;int b;float c;double d;则表达式a*b+d-c值的类型为( )。
-
以下程序的输出结果是double f(int n){ int i; double s;s=1.0;for(i=1; i<=n; i++) s+=1.0/i;return s;}main(){ int i,m=3; float a=0.0;for(i=0; i
-
9.下面程序的输出结果是#include double func(int x, int y, int z);int main(void){double x;int a=3, b=4, c=5;x = func(a, b, c);printf(\%f\, x);return 0;}double func(int x, int y, int z){double t;t = x % y * z;return t;}
-
若有定义 int a; float b; double c; 程序运行时输入: 3 4 5 能把值3输入给变量a、4输入给变量b、5输入给变量c的语句是( )。
-
下面程序的输出是: #include #define MAX 5 int a[MAX],k; void fun1() { for(k=0;k
-
有以下定义语句 double a , b ; int w ; 若各变量已正确赋值 , 则下列选项中正确的表达式是 ( )。
-
以下 程序代码的输出结果是:( ) int a=1.0; float b=2.0; double c=3.0 ; char d= ’ 1 ’ ; printf( “ %f ” ,a+b+c+d);
-
若有以下定义:| char a;int b;float c;double d;则表达式a*b+d-c值的类型为( )。
-
下列程序的运行结果为 include<iostream.h>void print(double a){cout<<++a;} void print(int a
-
阅读下面程序,则执行后的结果为include "stdio.h"fun1(){ int k=20; return k; }fun2(){ int a=15; return a; }fun3(int a,int b){ int k; k=(a-b)*(a+b); printf("%d\n",k);}main(){ un3(fun1(),fun2());}
-
有以下程序 main() {int a; char c=10; float f=100.0; double x; a=f/=c*(x=6.5); printf("%d %d %3.1f %3.1f\n",a,c,f,x);} 程序运行后的输出结果是
-
有以下函数定义:int mypr(double a,double b)return a*b;若以下选项中所用变量都已正确定义并赋值,错误的函数调用是
-
有以下程序:main(){int a;char c=10;float f=100.0;double x;a=f/=c*=(x=6.5);printf("%d%d%3.1f
-
有以下定义:“int a;long b;double X,Y;”,则以下选项中正确的表达式是()。
-
若有函数viod fun(double a(), int *n){………}以下叙述中正确的是()
-
以下程序的输出结果是 fun2(int a,int b) { int c; c=a*b%3; return c; } fun1(int a,int b) { int c; a+=a; b+=b; c=fun2(a,b); return c*c; } include “stdio.h” main() { int x=11,y=19; printf("%dn",fun1(x,y)); }
-
应用程序的 main 方法中有以下语句,则输出的结果是()。String s1="0.5", s2="12";double x=Double.parseDouble(s1);int =Integer.parseInt(s2);System.out.println(x+y);
-
有以下程序: include include struct A {int a;char b[10];double C;); struct A f(struct A t
-
有以下程序main(){ int a; char c=10;float f=100.0; double x;a=f/=c*=(x=6.5);printf(“%d %d %3.1f %3.1f”,a,c,f,x);}程序运行后的输出结果是
-
有如下程序: include using namespaee std; int main { void function(double val); double val: function(val); eout$amp;A.编译出错,无法运行