题目内容

阅读程序: 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 Next ReDim Preserve arr(3,4) For j=3 To 4 arr(3,j)=j+9 Next Print arr(3,2)+arr(3,4) End Sub 程序运行后,单击窗体,输出结果为

A. 21
B. 13
C. 8
D. 25

查看答案
更多问题

窗体上有Text1、Text2两个文本框及一个命令按钮Command1,编写下列程序 Dim y As Integer Private Sub Command1_Click() Dim x As Integer X=2 Text1.Text=Fun2(Fun1(x),y) Text2.Text=Fun1(x) End Sub Private Function Fun1(x As Integer)As Integer x=x+y:y=x+y Fun1=x+y End Function Private Function Fun2(x As Integer,y As Integer)As Integer Fun2=2*x+y End Function 当单击1次和单击2次命令按钮后,文本框Textl和Text2内的值分别是

A. 2 4
B. 2 4
C. 2 4
D. 4 8
E. 10 10
F. 58 58
G. 4 4
H. 8 8

在窗体上画一个名为Command1的命令按钮,其Command1_Click事件过程如下。 Sub Command1_Click() Dim student As studtype Dim record_no As Integer record n=1 With student .ino=12 .strname="Smith" .strsex=“男” .smark=89 End With ______ Put # 1,record_no,student Close # 1 End Sub 要求在c:\的随机文件student..dat写入一条记录。应在程序中空行处填入以下哪条语句使该功能完整

A. Open"c:\student.dat"For Input As # 1 len=len(student)
B. Open"c:\student.dat:For random As # 1 len=len(student)
C. Open"c:\student.dat"For Output As # 1 len=len(student)
D. Open"c:\student.dat"For Append As # 1 len=len(student)

George Washington, born February 22, 1732 in Virginia, was a natural leader, instrumental in creating a united nation out of a conglomeration of struggling colonies and territories. The first president of the United States of America is affectionately honored as "the father of his country". Shortly after his twenty-second birthday, Washington served in the army of King George III of England and was put in command of a troop of soldiers. At this time, King George III of England dominated the thirteen colonies along the east coast and much of the surrounding territories. Colonists began to want their freedom, and live with a set of rules based on democracy, not under the rule of a faraway king. The Boston Tea Party (波士顿倾茶事件) of 1773, a colonial rebellion against taxes, helped to spark the American Revolution. Washington led and encouraged his inexperienced armies against the British forces for eight years until the colonies won their independence. Laws for the new country were written into the Constitution and the Bill of Rights (权利与自由法案). The laws called for a President, and here again George Washington was considered the natural choice. He agreed to serve his country as the first President. George Washington moved from Mount Vernon, his family home south of Alexandria, Virginia, to New York City, then the capital of the United States. The trip took a week by horse and carriage. All along the way, people waited eagerly to glimpse the Revolutionary War general and their first President. Washington was a reluctant leader. As he inspired his soldiers through two wars, he saw himself serving his country, not leading it. When he accepted two terms as president, he saw himself serving God and his country in peacetime. He turned down a third term as president, wishing only to retire to his beautiful family home, Mount Vernon. Americans celebrated Washington’’s birthday while he was still alive. They were grateful for a strong leader who had proven that democracy was a feasible way to govern the growing country. And, while he was alive, legends grew up about him. The most famous one says that he was so strong, he threw a silver dollar across the Potomac River. Some Americans argue that this is a true story. Parts of the Potomac River, they say, were extremely narrow a few hundred years ago! Although Washington accepted two terms as president, he only saw himself________ his country instead of leading it.

执行下列程序后,鼠标单击窗体,输出结果为 Private Sub Form_Click() Print "Click"; End Sub Private Sub Form_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) Print "Donw" End Sub Private Sub Form_MouseUp(Button As Integer,Shift As Integer,X As Single,Y As single) Print "Up" End Sub

A. DownUpClick
B. ClickDownUp
C. DownClickUp
D. UpDownclick

答案查题题库