下列数组描述中不正确的代码是()。A、integer cou [7:0] ;B、reg bool [16:0] ;C、integer mat [4:0][0:127] ;D、reg [8*8:1] carray_value;

下列数组描述中不正确的代码是()。

  • A、integer cou [7:0] ;
  • B、reg bool [16:0] ;
  • C、integer mat [4:0][0:127] ;
  • D、reg [8*8:1] carray_value;

相关考题:

The range of an 8bit fixed point integer numbers(no signs)isA.0~127B.0~128C.0~256D.0~255

要定义数组A,使得其中每个元素的数据依次为:3、9、4、8、0、0、0,错误的定义语句是A.int A[ ]={3,9,4,8,0,0,0};B.int A[7]={3,9,4,8,0,0,0};C.int A[ ]={3,9,4,8);D.int A[7]={3,9,4,8);

下面4个CT函数中是用来判断用户输入的数是否为奇数的,是奇数的返回1,否则返回0,其中正确的是 ( )。A.Function CT(ByVal a As Integer)If a Mod 2=0 ThenReturn 0ElseReturn 1End ifEnd FunctionB.Function CT(ByVal a As Integer)If a Mod 2=0 ThenCT=0ElseCT=1End ifEnd FunctionC.Function CT(ByVal a As Integer)If a Mod 2=0 ThenCT=1ElseCT=0End ifEnd FunctionD.Function CT(ByVal a As Integer)If a Mod 2=0 ThenReturn 1ElseReturn 0End ifEnd Function

有以下程序: Option Base 1 Dimair()As Integer Private Sub Form_Click() Dimi As Integer,j As Integer ReDimalt(3,2) Fori=1 To 3 Forj=1 To 2 alt(i,j)=i*2+j Nextj Nexti ReDimPreservearr(3,4) Forj=3 To 4A. 8 13B.0 13C. 7 12D.0 0

函数过程F1的功能是:如果参数b为奇数,则返回值为1,否则返回值为0。以下能正确实现上述功能的代码是( )。A.Function F1(b As Integer)If b Mod 2 = 0 ThenReturn 0ElseReturn 1End IfEnd FunctionB.Function F1(b As Integer)If b Mod 2 = 0 ThenF1 = 0ElseF1 = 1End IfEnd FunctionC.Function F1(b As Integer)If b Mod 2 = 0 ThenF1 = 1ElseF1 = 0End IfEnd FunctionD.Function F1(b As Integer)If b Mod 2 0 ThenReturn 0ElseReturn 1End IfEnd Function

阅读程序: Private Sub Command1_Click( ) Dim arr Dim i As Integer arr=Array(0,1,2,3,4,5,6,7,8,9,10) For i=0 To 2 Print arr(7-i); Next End Sub 程序运行后,窗体上显示的是( )。A.8 7 6B.7 6 5C.6 5 4D.5 4 3

下列一维数组初始化语句中,正确且与语句floata[]={0,3,8,0,9};等价的是().A.floata[6]={0,3,8,0,9};B.floata[4]={0,3,8,0,9};C.floata[7]={0,3,8,0,9};D.floata[5]={0,3,8,0,9};

以下定义数组或给数组元素赋值的语句中,正确的是A.Dim a As Variant a=Array(1,2,3,4,5)B.Dim a (10) As Integer a=Array(1,2,3,4,5)C.Dim a%(10) a(1)="ABCDE"D.Dim a (3),b(3) As Integer a(0)=0 a(1)=1 a(2)=2 b=a

以下定义数组或给数组元素赋值的语句中,正确的是A.Dim x%(2) x(1)="等级考试"B.Dim x(3), y(3)As Integer x(0)=1:y=xC.Dim x x=Array(0,1,2)D.Dim x(3)As Integer x=Array(0,1,2)

要定义数组a,使得其中每个元素的数据依次为3,9,4,8,0,0,0,错误的定义语句是 ( )。A.int a[]={3,9,4,8,0,0,0};B.int a[9]={3,9,4,8,0,0,0};C.int a[]={3,9,4,8};D.int a[7]={3,9,4,8,0,0,0};

当Command1_Click事件发生时,窗体上显示的内容是 ______。 Private Sub Command1_Click() Dim a As Integer,b As Integer,c As Integer If a = 0 Then x = x-1 Else If b <> 0 Then x = 7 Else x=x+8 End If If c <> 0 Then x = x-3 Else x = 4 End If Print x End SubA.7B.8C.4D.3

在窗体上画一个名称为CoilTlilandl的命令按钮,然后编写如下事件过程: Private Sub command1 Click() Dim m As Integer, i As Integer, x(3)As Integer For i=0 To 3:x(i)=i:Next i For i = 1 To 2: Call sub1(x,i):Next i For i = 0 To 3: Print x(i);: Next i End Sub Private Sub sub1(a()As Integer,k As Integer) Dim i As Integer Do a(k)=a(k)+a(k+1) j = j + 1 Loop While j < 2 End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.0 3 7 5B.0 1 2 3C.3 2 4 5D.0 5 8 3

函数过程F1的功能是:如果参数b为奇数,则返回值为1,否则返回值为0。以下能正确实现上述功能的代码的是______。A. Function Fl(b As Integer) If b Mod 2=0 Then Return 0 Else Return 1 End If End FunctionB.Function Fl(b As Integer) If b Mod 2=0 Then F1=0 Else F1=1 End If End FunctionC.Function F1(b As Integer) If b Mod 2=0 Then F1=1 Else F1=0 End If End FunctionD.Function Fl(b As Integer) If b Mod 2<>Then Return 0 Else Return 1 End If End Function

23 有如下程序段,该程序段循环的次数是______。 Dim i As Integer Dim j As Integer Dim k As Integer k=0 For i = 0 To 10 Step 3 For j = 1 To 5 If j > 3 Then k = k + 4: Exit For k=k+1 Print k Next j If i > 8 Then Exit For Next iA.9B.10C.11D.12

单击一次命令按钮之后,下更程序代码的执行结果为______ 。 Public Sub Proc(a() As Integer) Static i As Integer Do a(i) = a(i) + a(i + 1) i=i+1 Loop While i < 2 End Sub Private Sub Command1_Cliek() Dim m As Integer Dim i As Integer Dim x(10) As Integer For i = 0 To 4 x(i) = i + 1 Next i For i = 1 To 2 Call Proc (x) Next i For i = 0 To 4 Print x(i); Next i End SubA.3 4 7 5 6B.3 5 7 4 5C.1 2 3 4 5D.1 2 3 5 7

在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为( )。 Private Sub fun() Static a As Integer a=a+2 Print a; End Sub Private Sub Command1_Click() Dim m As Integer For m=1 To 3 Call fun Next m End SubA.2 2 2B.0 0 0C.2 4 8D.2 4 6

语句Dim a(一3 T0 4,3 T0 6)As Integer定义的数组的元素个数是( )

要定义数组A,使得其中每个元素的数据依次为:3、9、4、8、0、0、0,错误的定义语句是( )。A.int A[]={3,9,4,8,0,0,0);B.int A[9]:{3,9,4,8,0,0,0);C.int A[]={3,9,4,8);D.int A[7]={3,9,4,8);

单击命令按钮后,下列程序代码的执行结果是______。Public Sub fun (a As Integer, b As Integer, c As Integer)Doa=b+ cn=n+1Loop While n > 3End SubPrivate Sub command1_ click()Dim m As Integer, n As Integer, i As IntegerFor i = 0 To 2: m = n + 1: Next iFor i = 1 To 2: Call fun (m, n, i): Next iFor i = 0 To 3Print m;Next iEnd Sub

下面4个CT函数中是用来判断用户输入的数是否为奇数的,是奇数的返回1,否则返回0,其中正确的是A.Function CT(ByVal a As Integer) If a Mod 2=0 Then Return 0 ElSe Return 1 End if End FunctionB.Function CT(ByVal a As Integer) If a Mod 2=0 Then CT=0 Else CT=1 End if End FunctionC.Function CT(ByVal a As Integer) If a Mod 2=0 Then CT=1 Else CT=0 End if End FunctionD.Function CT(ByVal a As Integer) If a Mod 2=0 Then Return 1 Else Return 0 End if End Function

程序代码如下,当单击窗体上的Command1控件时,在窗体上输出的结果是( )。 Private Sub Command1_Click() Dim aa(3,3)As Integer Dim i As Integer,j As Integer Dim s As Integer For i=0 To 3 For j=0 To 3 aa(i,j)=i*4+j+1 Next j Next i For i=0 To 3 s=s+aa(i,1) Next i Print s End SubA.32B.28C.30D.36

程序代码如下,当单击窗体上的Command1控件时,窗体上显示的结果是( )。 Private Sub Command1_Click() Dim i As Integer,a(9)As Integer For i=9 To 0 Step-1 a(i)=10-i Next i Print a(2); a(5);a(8) End SubA.2 5 8B.7 4 1C.8 5 2D.3 6 9

在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim n As Integer For n = 0 To 9 Step 3 Print rel(n); Next n End Sub Private Function rel(ByVal i As Integer)As Integer Dim x As Integer x = 0 For j = 1 To i If i < 5 Then rel = i: EXit Function x = x + i Next i rel = x End Function 程序运行后,单击命令按钮,则窗体上显示的内容是A.1 3 5 7B.2 8 14 53C.0 3 21 45D.0 5 11 34

函数过程n的功能是:如果参数b为奇数,则返回值为1,否则返回值为0。以下能正确实现上述功能的代码的是______。A.Function F1(b As Integer) If b Mod 2=0 Then Return 0 Else Return 1 End If End FunctionB.Function F1(b As Integer) If b Mod 2=0 Then F1=0 Else F1=1 End If End FunctionC.Function F1(b As Integer) If b Mod 2=0 Then F1=1 Else F1=0 End If End FunctionD.Functionn(b As Integer) If b Mod 2 <>0Then Return 0 Else Return 1 End If End Function

在窗体上面画一个命令按钮和一个标签,其名称分别为Command1和Label1,然后编写如下代码: Sub S(X As Integer,y As Integer) Static z As Integer y=x*x+Z z=y End Sub Private Sub Command1 Click( ) Dim i As Integer.z As Integer m=0 z=0 For i=1 T0 3 S i,Z m=m+z Next i Label1.Caption=Str(m) 程序运行后,单击命令按钮,在标签中显示的内容是( )。A.50B.20C.14D.7

程序代码如下,当单击窗体上的Command1控件时,窗体上输出的结果是( )。 Private Sub Command1_Click() Dim Y As Integer,I As Integer Dim A(7)As Integer Y=18:I=0 Do A(I)=Y Mod 2 I=I+1 Y=Y\2 Loop Until Y<1 For j=I-1 To 0 Step-1 Print A(j); Next j End SubA.1 0 0 0B.1 0 0 1 0C.0 0 1 1 0D.1 0 1 0 0

下列程序段的执行结果为______。 Dim m(3,3)As Integer Dim i As Integer Dim j As Integer Dim x As Integer For i=1 To 3 m(i,i)=i Next For i=0 T0 3 For j=0 To 3 x=x+m(i, j) Next Next Print xA.3B.4C.5D.6