假定有以下程序:
Private Sub Form_Click()
a=1:b=a
Do Until a>=5
x=a*b
Print b;x
a=a+b
b=b+a
Loop
End Sub
程序运行后,单击窗体,输出结果是
A.1 1 2 3
B.1 1 2 4
C.1 1 3 8
D.1 1 3 6
第1题:
以下程序段中,与语句:k=a>;b?(b>;c?1:O):0;功能相同的是( )。

第2题:
若有以下程序: #include <iostream> using namespace std; class point { private: int x, y; public: point ( ) { x=0; y=0; } void setpoint(int x1,int y1) { x=x1; y=y1;
A.12,12
B.5,5
C.12,5
D.5,12
第3题:
若有int i=1, xa; 则执行以下程序段后i的值是(). for(xa=1;xa<5;i++) xa++;
A.6
B.4
C.3
D.5
第4题:
有以下程序: #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
第5题:
以下程序段执行完后,变量A和B的值分别是( )。 A=1 B=A DO UNTIL A> =5 A=A+B B=B+A LOOP
A.1, 1
B.4, 6
C.5, 8
D.8, 13