网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

( 24 )有以下程序:

Option Base 1

Dim arr() As Integer

Private Sub Form_Click()

Dim i As Integer, j As Integer

ReDim arr(3, 2)

For i = 1 To 3

For j = 1 To 2

arr(i, j) = i * 2 + j

Next j

Next i

ReDim Preserve arr(3, 4)

For j = 3 To 4

arr(3, j) = j + 9

Next j

Print arr(3, 2); arr(3, 4)

End Sub

程序运行后,单击窗体,输出结果为

A ) 8 13

B ) 0 13

C ) 7 12

D ) 0 0


参考答案

更多 “ ( 24 )有以下程序:Option Base 1Dim arr() As IntegerPrivate Sub Form_Click()Dim i As Integer, j As IntegerReDim arr(3, 2)For i = 1 To 3For j = 1 To 2arr(i, j) = i * 2 + jNext jNext iReDim Preserve arr(3, 4)For j = 3 To 4arr(3, j) = j + 9Next jPrint arr(3, 2); arr(3, 4)End Sub程序运行后,单击窗体,输出结果为A ) 8 13B ) 0 13C ) 7 12D ) 0 0 ” 相关考题
考题 有以下程序 include using namespace std; class Base { int a; public: Base(int x) 有以下程序include <iostream>using namespace std;class Base{int a;public:Base(int x){ a=x; }void show(){ cout<<a; }class Derived : public Base{int b;public:Derived(int i) :Base(i+1),b(i){}void show() { cout<<b;};int main (){Base b(5),*pb;Derived d(1);pb=d;pb->show ();return 0;}运行后的打印结果是______。

考题 ●若二维数组arr[1..M,1..N】的首地址为base,数组元素按列存储且每个元素占用K个存储单元,则元素arr[i,j]在该数组空间的地址为 (21)。(21)A. base+((i-1)*M+j-1)*KB.base+((i-1)*N+j-1)*KC.base+((j-1)*M+i-1)*KD.base+((j-1)*N+i-1)*K

考题 ●若二维数组arr[1..M,1..N]的首地址为base,数组元素按列存储且每个元素占用K个存储单元,则元素arr[i,j]在该数组空间的地址为(21)。(21)A.base+((i-1)*M+j-1)*KB.base+((i-1)*N+j -1)*KC.base+((j-1)*M+i-1)*KD. base+((j-1)*N+i-1)*K

考题 有以下程序: include include using namespace std; int main () {char ch[] 有以下程序:include <fstream>include <string>using namespace std;int main (){char ch[] = "The end";ofstream outstr( "d:\\put.txt", ios_base: :app);for (int i = 0; i < strlen( ch ); i++ )outstr.put(ch[i]);outstr.close();return 0;}程序实现的功能是【 】。

考题 ● 若二维数组arr[1..M, 1..N]的首地址为base,数组元素按列存储且每个元素占用K个存储单元,则元素arr[i, j]在该数组空间的地址为 __ 。A.base+((i-1)*M+j-1)*KB.base+((i-1)*N+j-1)*KC. base+((j-1)*M+i-1)*KD. base+((j-1)*N+i-1)*K

考题 ● 若二维数组arr[1..M,1..N]的首地址为base,数组元素按列存储且每个元素占用K个存储单元,则元素arr[i,j]在该数组空间的地址为 (21) 。A.base+((i-1)*M+j-i)*KB.base+((i-1)*N+j-1)*KC.base+((j-1)*M+i-1)*KD.base+((j-1)*N+i-1)*K

考题 在窗体上画一个命令按钮,然后编写如下程序: Option Base 1 Private Sub Command1 Click() Dim Arr1(12)As Integer, Arr2(3)As Integer Dim Sum As Integer Sum = 2 For i=1 To 12 Arrl(i)= i Next i For i=1 To 3 Arr2(i)= Arrl(i*i) Next i For i = 1 To 3 Sum = Sum + Arr2(i) Next i Print Sum End Sub 程序运行后,单击命令按钮,在窗体上的输出结果为A.16B.24C.32D.36

考题 若二维数组arr[1…M,1…N]的首地址为base,数组元素按列存储且每个元素占用K个存储单元,则元素arr[i,j]在该数组空间的地址为( )。A.base+((i一1)*M*j-i)*K B.b ase+((i-1)*N+j-1)*K C.baSe+((j-l)*M十i-1)*K D.base+((j-1)*N+i-1)*K

考题 若二维数组arr[1..M,1..N]的首地址为base,数组元素按列存储且每个元素占用K个存储单元,则元素arr[i,j]在该数组空间的地址为______。A.base+((i-1)*M+j-1)*K B.base+((i-1)*N+j-1)*K C.base+((j-1)*M+i-1)*K D.base+((j-1)*N+i-1)*K