下列程序的执行结果为
Private Sub Command1_Click()
Dim s1 As String, s2 As String
s1= "abcd"
Call Transfer(s1, s2)
Print s2
End Sub
Private Sub Transfer (ByVal xstr As String, ystr As String)
Dim tempstr As String
i=Len(xstr)
Do While i >=1
tempstr=tempstr + Mid(xstr, i, 1)
i=i - 1
Loop
ystr=te mpstr
End Sub( )。
A.dcba
B.abdc
C.abcd
D.dabc
第1题:
运行下列程序:
Private Sub Command1_Click( )
Dim s1 As String * 1
Dim s2 As String
s1 = "a"
For i = Asc(s1) To Asc(s1) + 4
s2 = s2 & Chr(i)
Next i
Print s2
End Sub
单击Command1命令按钮后,则在窗体上显示的结果是( )。
A.a
B.abcde
C.aaaa
D.s2
第2题:
下列程序的执行结果为 Private Sub Commandl_Click() Dim s1 As String ,s2 As String s1= "abcd" Call Transfer(sl,s2) Print s2 End Sub Private Sub Transfer (ByVal xstr As String,ystr As String) Dim tempstr As String ystr=tempstr End Sub
A.dcba
B.abdc
C.abcd
D.dabc
第3题:
假设有定义 char s1[20]="1234567" ,s2[20]={"ABCD"};,则执行strcpy(s1,s2)后,s1的内容为“ABCD”
第4题:
下列程序的执行结果为 Private Sub Command1_Click() Dim s1 As String,s2 As String S1;="abcdef" Call Invert(s1,s2) Print s2 End Sub Private Sub Invert (ByVal xstr As String,ystr As String) Dim tempstr As String i=Len(xstr) Do While i>=1 tempstr=tempstr+Mid(xstr,i,1) i=i-1 Loop ystr=tempstr End Sub
A.fedcba
B.abcdef
C.afbecd
D.defabc
第5题:
在下面程序的横线处填上适当的内容,使程序执行后的输出结果为ABCD。
include<iostream>
using namespace std;
class A
{
public: A(){cout<<'A';}
};
class B:【 】
{
public:B(){cout<<'B';)
};
class C:【 】
{
public;C(){cout<<'C';}
};
class D:public B,public C
{
public:D(){cout<<'D';}
};
void main(){D obi;}