1. [单选题]有如下一段程序: SET TALK OFF A=1 B=0 DO WHILE A<:100 IF.NOT.A/2=INT(A/2)B=B+A ENDIF A=A+1 ENDD0 ? 8 SET TALK ON RETURN 该程序的功能是( )。
A. 求1到100之间的累加和
B. 求1到100之间的累加和除以2的商
C. 求1到100之间的偶数之和
D. 求1到100之间的奇数之和
2. [单选题]请判断下列代码在程序关闭时,正确的对象释放顺序
A. TMybutton=class(Tbutton)
B. Protected
C. Destructor Destroy;override;
D. End;
E. …………
F. Destroy;
G. Begin
H. inherited;
I. MessageBox(PChar(Name),’Destroy’,mb_ok);
J. end;
K. var AButton,BButton:TMyButton;
L. FormCreate(Sender:TObject);
M. begin
N. Create(Nil);
O. With AButton do
P. begin
Q. Parent:=form1;
R. Top:=100;
S. Left:=100;
T. Visible:=True;
U. Name:=’ABtn’;
V. end;
W. Create(Application);
X. With BButton do
Y. begin
Z. Parent:=Form1;