执行下面的程序,消息框里显示的结果是_______。
Private Sub Form_Click()
Dim Str As String
Str=""
S="Access"
Fori=Len(S)To 1 Step-l
Str=Str&Mid(S,i,1)
Next i
MsgBox Str
End Sub
第1题:
以下程序: #include<stdio.h> main() {char str[10]; scanf("%s",&str); printf("%s\n",str); } 运行上面的程序,输入字符串how are you,则程序的执行结果是( )。
A.how
B.how are you
C.h
D.howareyou
第2题:
执行下面的程序,单击窗体后在窗体上显示的结果是 ______。Private Sub form_ Click() Dim Str1 As String, Str2 As String Dim Str3 As String, I As Integer Str1 = "e" for I = t To 2 Str2 = Ucase (Str1) Str1 = Str2 & Str1 Str3 = Str3 & Str1 str1 = Chr (Asc(Str1) + I) Next I Print Str3End Sub
A.EeFF
B.eEfF
C.EEFF
D.eeFF
第3题:
执行下面的程序,单击窗体后窗体消息框内显示结果是( )。 PRIVATE SUB FORM_CLICK() DIM STR AS STRING, K AS INTEGER STR="AB" FOR K = LEN(STR) TO 1 STEP -1 STR=STR&CHR(ASC(MID(STR, K, 1)) +K) NEXT K MSGBOX STR END SUB
A.ABCE
B.ABCD
C.ABDB
D.ABFB
第4题:
执行下面的程序,消息框里显示的结果是( )。
Private Sub Form_Click()
Dim Str As String,S As String,k As Integer
S=Str
For k=Len(Str) To 1 Step -1
S=S & (Mid(Str,k,1)
Next k
End Sub
第5题:
有以下程序: #include <iostream> #include <string> using namespace std; class Y; class X { private: int x; char *strx; public: X(int a, char *str) { x=a; strx=new char[strlen(str)+1]; strcpy(strx,str); } void show(Y &ob) ; }; class Y { private: int y; char *stry; public: Y(int b,char *str) { y=b; stry=new char[strlen(str)+1]; strcpy(stry, str); } friend void X: :show(Y &ob) ; }; void X: :show(Y &ob) { cout<<strx<<", "; cout<<ob, stry<<end1; } int main ( ) { X a(10,"X"); Y b (20, "Y"); a. show(B) ; return 0; } 执行后的输出结果是( )。
A.X,Y
B.a,b
C.X,X
D.Y,Y