网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有如下函数:Private Function firstfunc(x As Integer, y As Integer) As Integer Dim n As Integer Do While n <= 4 x=x +y n=-+1 Loop firstfunc = x End Function调用该函数的事件过程如下:Private Sub Command1_lick() Dim x As Integer Dim y As Integer Dim n As Integer Dim z As Integer x=1 y=1 For n = 1 To 3 z = firstfunc(x, y) Next n Print z End Sub该事件过程的执行结果是 ______。
A.1
B.3
C.16
D.9
参考答案
更多 “ 有如下函数:Private Function firstfunc(x As Integer, y As Integer) As Integer Dim n As Integer Do While n <= 4 x=x +y n=-+1 Loop firstfunc = x End Function调用该函数的事件过程如下:Private Sub Command1_lick() Dim x As Integer Dim y As Integer Dim n As Integer Dim z As Integer x=1 y=1 For n = 1 To 3 z = firstfunc(x, y) Next n Print z End Sub该事件过程的执行结果是 ______。A.1B.3C.16D.9 ” 相关考题
考题
program exam(output); var x,y,x:integer; proedure silly(x:integer;vary:integer); begin x:=5;y:=6;z:=3; writeln(x,y,z) end; begin x:=1;y:=2;z:=3; silly(x,y); writeln(x,y,z) end. 以上程序运行结果为().
A567 563B567 567C567 167D567 163
考题
下列程序中,实现将封装数据类型Integer和基本数据类型int之间的转换,以及Integer,int类型和String类型之间的转换。请将程序补充完整。程序运行结果如下:123456456public class ex7_1{public static void main(String[]args) {Integer intObj;int n;String s;intObj = new Integer(123);n=intObj.__________;System.out.printin(Integer.toString(n));s=new String("456");intObj=Integer._________;System.out.println(intObj.__________);n=Integer.parseInt(s);System.out.println(Integer.toString(n));}}
考题
如果Add函数的调用代码为:func main() {var a Integer = 1var b Integer = 2var i interface{} = asum := i.(Integer).Add(b)fmt.Println(sum)}则Add函数定义正确的是()
A.type Integer intfunc (a Integer) Add(b Integer) Integer { return a + b}B.type Integer intfunc (a Integer) Add(b *Integer) Integer { return a + *b}C.type Integer intfunc (a *Integer) Add(b Integer) Integer { return *a + b}D.type Integer intfunc (a *Integer) Add(b *Integer) Integer { return *a + *b}
考题
下列程序的运行结果为______。 #define MS DOS #ifdef MS DOS #define INTEGER SIZE 32 #else #define INTEGER SIZE 16 #endif main () { printf ("integer_size=%d\n", INTEGER_SIZE); }A.integersize=32B.integer_size=16C.integersize=32,integer_size=16D.错误
考题
链表的定位函数loc(I:integer):pointer; {寻找链表中的第I个结点的指针}procedure loc(L:linklist; I:integer):pointer;var p:pointer;j:integer;
考题
一个函数的定义行如下,在命令行中对此函数的正确调用方式不可能为()。 function [s,r]=repvec(x,n)A.repvec(1:5,2)B.y=repvec(x,n)C.[x,y]=repvec(vec)D.[s,r]=repvec
考题
11、下面哪些定义是类型正确的?A.f :: (Integer, Integer) - Float f (x,y) = x / yB.f :: (Integer, Integer) - Float f (x,y) = (fromInteger x) / (fromInteger y)C.f :: (Integer, Integer) - Float f (x,y) = 3*x + yD.f :: (Integer, Integer) - Integer f (x, y) = 3*x + y
热门标签
最新试卷