以下函数值的类型是() fun(floatx) {floaty; y=3*x-4: returny;}A、intB、不确定C、voidD、float
以下函数值的类型是() fun(floatx) {floaty; y=3*x-4: returny;}
- A、int
- B、不确定
- C、void
- D、float
相关考题:
若各选项中所用变量已正确定义,函数 fun 中通过 return 语句返回一个函数值,以下选项中错误的程序是A)main(){ …… x=fun(2,10); …… }float fun(int a,int b){ …… }B)float fun(int a,int b){ …… }main(){ …… x=fun(i,j); …… }C)float fun(int,int);main(){ …… x=fun(2,10); …… }float fun(int a,int b) { …… }D)main(){ float fun(int i,int j);…… x=fun(i,j); …… }float fun(int a,int b){ …… }
下列程序段不会发生二义性的是_。 A.int fun(double p){…;} float fun(float p){…;} int x; x=fun(0);B.int fun(float p){…;}float fun(unsigned p){…;} int x; x=fun(0);C.int fun(int i,int j=2){…;}float fun(int i){…;} coutfun(5);D.int fun(int i=2,int j=2){…;} int fun(int *p){…;} coutfun(5);
设有如下函数: fun(floatx) { x*=x++; printf("%d\n",x); return(x); } 则函数的类型是______。A.floatB.voidC.intD.无法确定
若各选项中所用变量已正确定义,fun()函数中通过return语句返回一个函数值,下列选项中错误的程序是( )。A.main() {……x=fun(2,10);……} float fun(int a,int b){……}B.float fun(int a,int b){……} main() {……x=fun(i,j);……}C.float fun(int,int); main() {……x=fun(2,10);……} float fun(int a,int b){……}D.main() {float fun(int I,intj); ……x=fun(i,j);……} float fun(int a,int b){……}
设已有定义:floatx;则以下对指针变量p进行定义且赋初值的语句中正确的是()。 A.int*p=(floatx)B.floatp=&xC.float*p=1024D.float*P=&x
有下列函数定义: fun(float h) { printf(%f,%f\n,h,h*h);) 该函数的类型是( )。A.int类型B.float类型C.void类型D.函数无类型说明,定义有错
l设已有定义:floatx;,则以下对指针变量p进行定义且赋初值的语句中正确的是( )。A.float*p=S l设已有定义:floatx;,则以下对指针变量p进行定义且赋初值的语句中正确的是( )。A.float*p=&x;B.int*p-(float)x;C.float p=&x;D.float*p=1024;
有下列函数定义: fun(float h) { printf("%f,%f\n",h,h*h);) 该函数的类型是( )。A.int类型SX 有下列函数定义: fun(float h) { printf("%f,%f\n",h,h*h);) 该函数的类型是( )。A.int类型B.float类型C.void类型D.函数无类型说明,定义有错
以下程序的输出结果是 void fun(float*p1,float*p2,float*s) { s=(float*)calloc(1,sizeof(float)); *s=*p1+*p2++;} main() { float a[2]={1.1,2.2},b[2]={10.0,20.0},*s=a; fun(a,b,s); printf("%5.2f\n",*s);}A.11.1B.12C.21.1D.1.1
若各选项中所有变量已正确定义,函数fun中通过return语句返回一个函数值,以下选项中错误的程序是______。A.mam() {…… x=fun(2,10); ……} fioat fun(int a,int b) { ……}B.float fun (int a,int b) {……} main() {…… x=fun(i,j); ……}C.float fun (int int); main() {…… x=fun(2,10); ……} float fun (int a,int b){ ……}D.main() { float fun (int i, int j); …… x=fun(i,j); ……} float fun (int a,int b){ ……}
下列函数的定义,正确的是( )。A.float sum(x,y) {float x,y;……}B.float sum(float x,float y); {……}C.float sum(float x,float y) {……}D.float sum(floatx,floaty) {……}
下列重载函数中,正确的是( )。A.void fun(int a,float b);void fun(int C,float d)B.void fun(int a,float b);void fun(float a,int b)C.float fun(int a,float b);int fun(int b,float a)D.int fun(int a,int b);float fun(int a,int b)
设函数fun的定义形式为 void fun(char ch, float x) { … } 则以下对函九fun的调节器用语句中,正确是A.fun("abc",3.0);B.t=fun('D',16.5);C.fun('65',2.8):D.fun(32,32);
若下列各选项中所有变量已正确定义,函数fun通过return语句返回一个函数值,以下选项中错误的程序是( )。A.main( ) {...... x = fun(2,10);......} float fun(int a, int b){......}B.float fun( int a,int b){......} main( ) {......x = fun(i,j);......}C.float fun(int, int); main( ) {......x=fun(2,10);......} float fun(iht a, int b){......}D.main( ) { float fun(int i, int j); ...... x = fun(i,j);......} float fun(int a,int b) {......}
下面的方法重载,正确的是()。A、int fun(int a, float b) { } float fun(int a, float b) { }B、float fun(int a, float b) { } float fun(int x, float y) { }C、float fun(float a) { } float fun(float a, float b) { }D、float fun1(int a, float b) { } float fun2(int a, float b) { }
把x、y定义成float类型变量,并赋同一初值3.14的定义语句是()A、floatx,y=3.14;B、floatx,y=2*3.14;C、floatx=3.14,y=3.14;D、floatx=y=3.14;
要为float类型变量x、y、z赋同一初值3.14,下列说明语句哪一个是正确的()。A、floatx,y,z=3.14;B、floatx,y,z=3*3.14;C、floatx=3.14,y=3.14,z=3.14;D、floatx=y=z=3.14;
单选题下列重载函数中,正确的是( )。Avoid fun(int a,float b);void fun(int C,float d)Bvoid fun(int a,float b);void fun(float a,int b)Cfloat fun(int a,float b);int fun(int b,float a)Dint fun(int a,int b);float fun(int a,int b)
单选题下面的方法重载,正确的是()。Aint fun(int a, float b) { } float fun(int a, float b) { }Bfloat fun(int a, float b) { } float fun(int x, float y) { }Cfloat fun(float a) { } float fun(float a, float b) { }Dfloat fun1(int a, float b) { } float fun2(int a, float b) { }