5以下正确的函数定义是()。
A: int*fun10(doublex){returnx;}
B: int*fun10(doublex){return&x;}
C: int*fun10(inta){return*a;}
D: int*fun10(inta){return&a;}
A: int*fun10(doublex){returnx;}
B: int*fun10(doublex){return&x;}
C: int*fun10(inta){return*a;}
D: int*fun10(inta){return&a;}
举一反三
- 下面代码正确的是( ) A: int * fun(){int *p=new int[10];for(int i=0;i<10;++i)p[i]=i;return p;} B: int *fun(){int p[10];for(int i=0;i<10;++i)p[i]=i;return p;} C: int *fun( ){a=10;return &a;} D: int *fun( ){int a=5,*p=&a;return p;}
- 以下函数定义中,正确的是( ). 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;}
- 下列程序输出结果是( ) #include[stdio.h] int fun(int n) { if(n<10) return n; else return (n%10)*fun(n/10); } main() { printf("%d",fun(218)); }
- 以下正确的函数定义是() 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;}
- 以下正确的函数定义是() 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;}