运行下面程序,其输出结果(str2的值)为【 】。Dim str1,str2 As StringDim i As Integerstrl="abcdef"For i=1 To Len(str1) Step2str2=UCase(Mid(str1,i,1))+str2NextMsgBox str2

题目

运行下面程序,其输出结果(str2的值)为【 】。

Dim str1,str2 As String

Dim i As Integer

strl="abcdef"

For i=1 To Len(str1) Step2

str2=UCase(Mid(str1,i,1))+str2

Next

MsgBox str2


相似考题
更多“运行下面程序,其输出结果(str2的值)为【】。Dim str1,str2 As StringDim i As Integerstrl="abcdef" ”相关问题
  • 第1题:

    21. 下面判断字符串str1是否大于str2的表达式正确的是()。 A. if(str1>str2) B. if(strcmp(str1,str2)) C. if(strcmp(str1,str2)>0) D. if(strcmp(str2,str1)>0)

    A.A

    B.B

    C.C

    D.D


    D

  • 第2题:

    2、以下关于strcmp(str1, str2)的说法正确的是()。

    A.若strcmp(str1, str2)的值为非0值,说明str1和str2相等。

    B.若strcmp(str1, str2)的值为0值,说明str1和str2相等。

    C.若strcmp(str1, str2)的值为负数,说明比较失败。

    D.若strcmp(str1, str2)的值为正数,说明str1比str2更长。


    若strcmp(str1, str2)的值为0值,说明str1和str2相等。

  • 第3题:

    若有定义:char strl[10],str2[ ]="student"; 以下能把str2中的字符串赋给strl的语句是()。

    A.for(int i=0; i<=strlen(str2); i++) str1[ i ]=str2[ i ];

    B.str1="student";

    C.str1=str2;

    D.for(int i=0; str2[ i ]!=0; i++) str1[ i ]=str2[ i ];


    D

  • 第4题:

    运行以下程序,输出结果的是: str1 = "Dongbei University" str2 = str1[:7] + " Normal " + str1[-10:] print(str2)

    A.Normal U

    B.Dongbei Normal

    C.Normal University

    D.Dongbei Normal University


    t a=1,b=0; if(!a) b++; else b+=3; printf(“%d
    ”,b); return 0;

  • 第5题:

    下面代码的输出结果是‪‪‪‪‪‫‪‪‪‪‪‫‪‪‪‪‪‫‪‪‪‪‪‫‪‪‪‪‪‪‫ str1 = "mysqlsqlserverPostgresQL" str2 = "sql" ncount = str1.count(str2) print(ncount)

    A.2

    B.5

    C.3

    D.4


    45