有如下程序段,该程序段运行后变量c的值为______。 Dim c As String, a As Boolean a = True If Not a Then c = Chr(Asc("A") + 1) Else c = Chr(Asc("A") + 2) End IfA.66B.67C."B"D."C"

有如下程序段,该程序段运行后变量c的值为______。 Dim c As String, a As Boolean a = True If Not a Then c = Chr(Asc("A") + 1) Else c = Chr(Asc("A") + 2) End If

A.66

B.67

C."B"

D."C"


参考答案和解析
A

相关考题:

● 执行下面的一段C 程序后,变量sum的值应为 (49) 。char chr = 127;int sum = 300;chr += 1;sum += chr;A. 428 B. 172 C. 300 D. 427

把窗体的KeyPreview属性设置为Tree,然后编写如下事件过程 Private Sub Form_KeyPress(KeyAscii As Integer) Dim ch As String ch=Chr(KeyAscii) KeyAscii=Asc(UCase(ch)) Print Chr(KeyAscii+2) End Sub 程序运行后,按键盘上的“A”键,则在窗体上显示的内容是______。A. AB.BC.CD.D

把窗体的KeyPreview属性设置为True,然后编写如下事件过程Private Sub Form_KeyPress(KeyAscii As Integer)Dim ch As Stringch = Chr(KeyAscii)KeyAscii = Asc(UCase(ch))Print Chr(KeyAscii + 2)End Sub程序运行后,按键盘上的“A”键,则在窗体上显示的内容是( )。A.AB.BC.CD.D

以上程序段运行的结果是:______. Dim a(-1 To 5) As Boolean Dim flag As Boolean flag = False Dim i As Integer Dim j As Integer Do Until flag = True For i = -1 To 5 j=j+1 if a(i)= False Then a(i)= True Exit For End If If i = 5 Then flag = True End If Next Loop Print jA.20B.7C.35D.8

在窗体上画一个文本框(Textl),然后编写如下事件过程: Private Sub Text1_KeyPress(KeyAscii As Integer) Dim char As String char=Chr(KeyAscii) KeyAscii=Asc(Ucase(char)) Print String(4,KeyAscii) End Sub 程序运行后,在文本框Text1中输入A,则程序在窗体上的输出结果为A.aB.AC.aaaaD.AAAA

在窗体上画一个名称为Text1的文本框,然后编写如下事件过程: Private Sub Text1_ KeyPress (KeyAscii As Integer) Dim ch As String ch = Chr (KeyAscii) KeyAscii = Asc (UCase(ch)) TextText = String(1, KeyAscii) End Sub程序运行后,使文本框拥有焦点,然后按键盘上的B键,则在文本框中显示的内容是 ______。A.bB.bbC.BBD.B

把窗体的KeyPreview属性设置为True,然后编写如下事件过程: Prirate Sub Form_KeyPress(KeyAscii As Integer) Dim ch As String ch=Chr(KeyAscii) KeyAscii=Asc(UCase(ch)) Print Chr(KeyAscii+2) End Sub 程序运行后,按键盘上的A键,则在窗体上显示的内容是A.AB.BC.CD.D

在窗体上画一个文本框,然后编写如下事件过程: Private Sub Text1_KeyPress(Key Ascii As Integer) Dim char As String char=Chr(Key Ascii) KeyAscii=Asc(UCase(char)) Text1.Text=Sting(6,KeyAscii) End Sub 程序运行后,如果在键盘上输入字母“a”,则文本框中显示的内容为______。A.aB.AC.aaaaaaaD.AAAAAAA

有如下一段程序: SET TALK OFF AY="Hello World!" BY="X" CY=ASC(BY)+1 DY=30 EY=CHR(DY*2+5)+CHR(CY) EY=EY ?"EY." SET TALK ON RETURN 执行该程序后,屏幕显示的结果为A.AYB.BYC.Hello World!D.程序出错

窗体上画一个名称为Text1的文本框,然后编写如下事件过程: Private Sub Form. Load() Show TextSetFocus End Sub Private Sub Text1_ KeyPress (KeyAscii As Integer) Dim ch As String ch = Chr (KeyAscii) KeyAscii = Asc(UCase(ch)) Pint Chr(KeyAscii + 4) End Sub程序运行后,在文本框中输入abcde,则在窗体上显示的内容是______。A.abcdeB.efghiC.EFGHID.ABCDE

下面的程序段运行后,变量S的值变为“65666768”,则程序中“表达式”为( )。 i+1Do While 表达式 S=S ASC(Chr¥(i+64)) i=i+1 LoopA.i>5B.NOT(i<>5)C.i<5D.i=5

在窗体上有一个命令按钮,然后编写如下事件过程: Private Sub Command1Click( ) Dim a(5)As String For i=1,To 5 a(i)=Chr(Asc("A")+(i-1)) Next i For Each b In a Print b; Next End Sub 程序运行后,单击命令按钮,输出结果是( )。A.ABCDEB.1 2 3 4 5C.abcdeD.出错信息

在窗体上面有一个文本框,其名称为Text1,然后编写如下事件过程: Private Sub Text1_KeyPress(KeyAscii As Integer) Dim str As String str=Chr(KeyAscii) KeyAscii=Asc(UCase(str)) TextText=String(2,KeyAscii) End Sub 程序运行后,如果在键盘上输入字母“a”,则在文本框Text1中显示的内容为( )。A.aaaB.AAAC.AAD.aa

在窗体上画一个名称为command1的命令按钮,然后编写如下程序; Option Base 1 Private Sub Command1_Click() Dim arr(4)As String For i=1 To 4 arr(i) = Chr(Asc("A")+(i-1)) Next i For Each b1 In arr Print b1; Next End Sub 程序运行后,如果单击命令按钮,则在窗体上输出的内容为 ______。A.ABCDB.abcdC.出错信息D.1 2 3 4

把窗体的KeyPreview属性设置为True,然后编写如下事件过程: Private Sub Form_KeyPress(KeyAsciiASInteger) Dim ch As String ch=Chr(KeyAscii) KeyAscii=Asc(UCase(ch)) PrintChr(KeyAscii+2) End Sub 程序运行后,按键盘上的A键,则在窗体上显示的内容是( )。A.AB.BC.CD.D

在窗体画一个命令按钮,然后编写如下事件过程: Private Sub Commandl Click() Dim a(5)As String For i=1 To 5 a(i)=Chr(Asc("A")+(i-1)) Next i For Each b In a Print b; Next End Sub 程序运行后,单击命令按钮,输出结果是______。A. ABCDEB.1 2 3 4 5C.abcdeD.出错信息

在窗体上画一个文本框,然后编写如下事件过程:Private Sub Text1_ KeyPress(KeyAscii As Integer) Dim char As String char=Chr(KeyAscii) KeyAscii=Asc(UCase(char)) Text1. Text= String(6,KeyAscii)End Sub程序运行后,如果在键盘上输入字母“a”,则文本框中显示的内容为______。A.aB.AC.aaaaaaaD.AAAAAAA

在窗体上画一个文本框,其名称为Text1,然后编写如下事件过程: Private Sub Text1_KeyPress(KeyAscii As Integer) Dim sb As String Str=Chr(KcyAscii) KeyAscii=Asc(UCase(str)) Text1.Text=String(2,KeyAscii) End Sub 程序运行后,如果在键盘上输入字母“b”,则在文本框Text1中显示的内容是A.bbbB.BBBC.BBD.bb

在窗体上画一个文本框,然后编写如下事件过程。当该程序运行后,如果在键盘上输入字母e,则文本框中显示的内容为 ______。 Private Sub Text1_KeyPress(KeyAscii As Integer) Dim char as String char=Chr(KeyAscii) KeyAscii=Asc(UCase(char)) Text1.Text=String(5,KeyAscii) End SubA.eeeeeB.EEEEEC.eeeeeeD.EEEEEE

在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Commandl_Click() Dim a(5)As String Fori=1 To 5 a(i)=Chr(Asc("A")+(11)) Nexti For Each b In a Print b Next End Sub 程序运行后,单击命令按钮,输出结果是( )。A.ABCDEB.1 2 3 4 5C.abcdeD.出错信息

在窗体上画一个文本框,其名称为Text1,然后编写如下事件过程:Private Sub Text1_KeyPress(KeyAscii As Integer)Dim str As StringStr=Chr(KeyAscii)KeyAscii=Asc(UCase (str))Textl.Text=String(2, KeyAscii)End Sub程序运行后,如果在键盘上输入字母"b",则在文本框Text1中显示的内容是A.bbbB.BBBC.BBD.bb

执行下面的一段C程序后,变量sum的值应为______。 char chr=127; int sum=300; chr +=1; sum +=chr;A.428B.172C.300D.427

运行下列程序:Private Sub Command1_Click( )Dim s1 As String * 1Dim s2 As Strings1 = aFor i = Asc(s1) To Asc(s1) + 4s2 = s2 Chr(i)Next iPrint s2End Sub单击Command1命令按钮后,则在窗体上显示的结果是( )。A.aB.abcdeC.aaaaD.s2

把窗体的KeyPreview属性设置为True,然后编写如下事件过程(KeyAscii As Integer)Dim ch As Stringch = Chr(KeyAscii)KeyAscii = Asc(UCase(ch))Print Chr(KeyAscii + 2)程序运行后,按键盘上的“A”键,则在窗体上显示的内容是( )。A.AB.BC.CD.D

在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a(5)As String For i=1 T0 5 a(i)=Chr(Asc("A")+(i-1)) Next i For Each b In a Print b; Next End Sub 程序运行后,单击命令按钮,输出结果是______。A.ABCDEB.1 2 3 4 5C.abodeD.出错信息

以下程序段运行的结果是______。 Dim a(-1 To 5)As Boolean Dim flag As Boolean flag=False Dim i As Integer Dim j As Integer Do Until flag=True For i=-1 To 5 j=j+l If a(i)=False Then a(i)=True Exit For End If If i=5 Then flag=True End If Next Loop Print jA.20B.7C.35D.8

执行下面的一段C程序后,变量result的值应为(62)。(08年55)(09年49) char chr = 127; int result = 128; chr += 1; result += chr;A.OB.1C.128D.256

已知字符串变量S1的值为一个小写字母,以下表达式能将小写字母变成大写字母的有()。A、Chr(Asc(S1)+Asc("A")-Asc("a"))B、Chr(Asc(S1)–32)C、LCase(S1)D、UCase(S1)E、Val(S1)