( 14 )执行以下程序后输出的是
Private Sub Command1_Click()
Ch$= ” AABCDEFGH ”
Print Mid(Righ(ch$,6),Len(left(ch$,4)),2)
End Sub
A)CDEFGH
B)ABCD
C)FG
D)AB
第1题:
执行下面的程序,单击命令按钮后,窗体中的输出结果是 ______。 Private Sub Cotomand1_Click() Ch$="Welcome Home!" a=Len(ch$) For i= 1 To a b$ = Mid(ch$, i 1) If b$ = "m" Then m = m + 1 Next 1 Print m End Sub
A.2
B.3
C.1
D.0
第2题:
执行以下程序后输出的是。 Private Sub Commandl_Click ch$ = "ABCDEFGH": Print Mid(Right(ch$, 6), Len(Left(ch$, 4)), 2) End Sub A.CDEFGH B.ABCD C.FG D.AB
第3题:
在执行以下程序时,如果从键盘上输入:ABCdef<回车>,则输出为______。 main() { char ch; while((ch=getchar())!='\n') { if(ch>='A' && ch<='Z') ch=ch+32; else if(ch>='a'&&ch<='2')ch=ch-32; printf("%c",ch); } printf("\n"); }
A.ABCdef
B.abcDEF
C.abc
D.DEF
第4题:
有如下程序: #include<iostream> using namespace std; class TestClass { private: int x,y; public: TestClass (int i,int j) { x=i; y=j; } void print() { cout<<"print1"<<end1; } void print()const { cout<<"print2"<<end1; } }; int main() { const TestClass a(1,2); a.print(); return 0; } 该程序运行后的输出结果是( )。
A.print1
B.print2
C.print1 print2
D.程序编译时出错
第5题:
若有以下程序:
include <iostream>
using namespace std;
class Sample
{
private:
const int n;
public:
Sample(int i) :n(i) {)
void print()
{
cout<<"n="<<n<<end1;
}
};
int main()
{
sample a(10);
a.print();
return 0;
}
上述程序运行后的输出结果是【 】。