下列重载函数中,正确的是( )。
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)
第1题:
( 21 )已知函数 fun 的原型为
int fun ( int,int,int ) ;
下列重载函数原型中错误的是
A ) char fun ( int,int ) ;
B ) double fun ( int,int,double ) ;
C ) int fun ( int,char* ) ;
D ) float fun ( int, int, int ) ;
第2题:
有下列函数定义: fun(float h) { printf("%f,%f\n",h,h*h);) 该函数的类型是( )。
A.int类型
B.float类型
C.void类型
D.函数无类型说明,定义有错
第3题:
设有以下函数
void fun(int n,char * s) { …… }
则下面对函数指针的定义和赋值均是正确的是
A)void (*pf)(); pf=fun;
B)viod *pf(); pf=fun;
C)void *pf(); *pf=fun;
D)void (*pf)(int,char);pf=&fun;
第4题:
有下列函数定义:
fun(float h)
{ printf("%f,%f\n”,h,h*h);}
该函数的类型是( )。
A.int类型
B.float类型
C.void类型
D.函数无类型说明,定义有错
第5题:
有下列函数定义: fun(float h) { printf("%f,%f\n",h,h*h);) 该函数的类型是( )。
A.int类型
B.float类型
C.void类型
D.函数无类型说明,定义有错
第6题:
设有以下函数: void fun(int n,char*s){…} 则下面对函数指针的定义和赋值均正确的是( )。
A.void(*pf)( );pf=fun;
B.void*pf( );pf=fun
C.void*pf( );*pf=fun;
D.void(*pf)(int,char);pf=&fun;
第7题:
设有以下函数:
void fun(int n,char*$s){……}
则下面对函数指针的定义和赋值均正确的是
A.void(*pf)( );pf=fun;
B.void*Pf( );pf=fun;
C.void*pf( ); *pf=fun;
D.void(*pf)(int,char);nf=&fun;
第8题:
下列说法不正确的是
A.int *fun();----fun是一个返回int指针的函数
B.int (*fun)();---fun是一个返回int指针的函数
C.int (*array[5])();----array是一个有5个元素的数组,每一个元素都是一个函数指针,指向一个返回int的函数
D.int (*fun(int))(int);----fun是带有一个int参数的函数,返回值是一个函数指针,这个指针指向带有一个int参数并返回int的函数
第9题:
设有以下函数:
voidfun(intn,char}s){……}
则下面对函数指针的定义和赋值均正确的是( )。
A.void(*pf)(int,char);pf=&fun;
B.void+pf( );pf=fun;
C.void*pf( );*pf=fun;
D.void(*pf)(int,char*);pf=fun;
第10题:
有下列函数定义: fun(float h) { printf("%f,%f\n",h,h*h);} 该函数的类型是( )。
A.int类型
B.float类型
C.void类型
D.函数无类型说明,定义有错