有如下函数过程:
Function Fun(By Val x As Ingeger,ByVal y As Integer) As Integer
DO While …y<>0
reminder=x Mod y
x=y
y=reminder
Loop
Fun=x
End Function
以下是调用该函数的事件过程,该程序的运行结果是
Private Sub Command1_Click()
Dim a As Integer
Dim b As Integer
a=100:b=25
x=Fun(a,B)Print x
End Sub
A.0
B.25
C.50
D.100
第1题:
有下列函数定义:
int fun(double a,double B)
{return a*b;}
若下列选项中所用变量都已正确定义并赋值,错误的函数调用是( )。
A.if(fun(x,y)){……}
B.z=fun(fun(x,y),fun(x,y));
C.z=fun(fun(x,y)x,y);
D.fun(x,y);
第2题:
若有函数fun(x,y),并且已经使函数指针变量p指向函数fun,则使用p调用函数fun的正确方法是( )。
A.(*p)fun(x,y);
B.*pfun(x,y);
C.(*p)(x,y)
D.*p(x,y)
第3题:
有下列函数定义:int fun(double a,double b) {return a*b;} 若下列选项中所用变量都己正确定义并赋值,错误的函数调用是( )。
A.if(fun(x,y)){……}
B.z=fun(fun(x,y),fun(x,y));
C.z=fun(fun(x,y)x,y);
D.fun(x,y);
第4题:
有下列函数定义: int fun(double a,double b) {return a*b;} 若下列选项中所用变量都已正确定义并赋值,错误的函数调用是( )。
A.if(fun(x,y)){……}
B.z=fun(fun(x,y),fun(x,y));
C.z=fun(fun(x,y)x,y);
D.fun(x,y);
第5题:
有以下函数定义: int fun(double a,doubleB){return a*b;} 若以下选项中所用变量都已正确定义并赋值,错误的函数调用是( )。
A.if(fun(x,y)){……}
B.z=fun(fun(x,y),fun(x,y));
C.z=fun(fun(x,y)x,y);
D.fun(x,y);
第6题:
11、下面哪些定义是类型正确的?
A.f :: (Integer, Integer) -> Float f (x,y) = x / y
B.f :: (Integer, Integer) -> Float f (x,y) = (fromInteger x) / (fromInteger y)
C.f :: (Integer, Integer) -> Float f (x,y) = 3*x + y
D.f :: (Integer, Integer) -> Integer f (x, y) = 3*x + y