以下程序的输出结果是 void fun(float *a,float *b) {float w; *a=*a+*a; w=*a; *a=*b; *b=w; } main() {float x=2.0,y=3.0; float *px=&x,*py=&y; fun(px,py); printf("%2.0f,%2.0f\n",x,y); }
举一反三
- 以下程序运行后的输出结果是____________。#include<;stdio.h>;float f(float x,float y){ x+=1;y+=x;return y;}main(){float a=1.6,b=1.8;printf("%f\n ", f(b-a,a));}
- 下面函数定义正确的是_____。 A: float fun(float x; float y){ return x*y;} B: float fun(float x, y){ return x*y;} C: float fun(x,y){ int x,y; return x*y;} D: float fun( int x, int y){ return x*y; }
- 以下函数定义中,正确的是( ). A: float fun(float x,y){ ... return x+y;} B: float fun(int x,int y);{ ... return x+y;} C: int fun(float x,float y);{ ... return x+y;} D: float fun(float x,int y){ ... return x+y;}
- 下面函数定义格式正确的是( ) A: float f(float x, float y); B: float f(float x;float y) C: float f(float x, y) D: float f(float x, float y)
- 以下程序的功能是计算下面函数的值。请填空。 # include # include float f( float,float,float); int main( ) { float x,y,z,sum; printf("\ninput x,y,z:\n"); scanf("%f%f%f",&x,&y,&z); sum=( ); printf("sum= %f\n",sum); return(0); } float f(float a,float b,float c) { float value; value=( ); return(value); }2f4cdb578a913e638a60b2fa2096c3a4.png