比较羧酸HCOOH(I),CH3COOH(II),(CH3)2CHCOOH(III),(CH3)3CCOOH(IV)的酸性大小()。
第1题:
阅读程序: Sub p( b () As Integer)For i =1To 4 b(i) = 2(iNext i End Sub Private Sub Command1_Click()Dim a (1 To 4) As Integer a(1)=5 a(2)=6 a(3)=7 a(4)=8 call p (a) For i=1 To 4 Print a(i) Next iEnd Sub运行上面的程序,单击命令按钮,输出结果为。
第2题:
以下程序的运行结果是( ) #define MAX 10 int a[MAX],i; main() { printf("\n");sub1();sub3(A) ,sub2(),sub3(A) ; } sub2() { int a[MAX],i,max; max=5; for(i=0;i<max;i++)a[i]=i; } sub1() {for(i=0;i<MAX;i++)a[i]=i+i; } sub3(int a[]) { int i; for(i=0;i<MAX,i++)printf("%d",a[i]); printf("\n"); }
A.0 2 4 6 8 10 12 14 16 18 0 1 2 3 4
B.0 1 2 3 4 0 2 4 6 8 10 12 14 16 18
C.0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
D.0 2 4 6 8 10 12 14 16 18 0 2 4 6 8 10 12 14 16 18
第3题:
若有以下变量和函数说明: #include<iostream.h> charCh='*'; void sub(int x,int y,char ch,double*Z) { switch(ch) { case'+':*Z=x+y;break; case'-':*Z=x-y;break: case'*':*Z=x*y;break; case'/':*z=x/y;break: } } 以下合法的函数调用语句是( )。
A.sub(10,20,Ch,y);
B.sub(1.2+3,2*2,'+',&Z);
C.sub(sub(1,2,'+',&y),sub(3,4'+',&x),'-',&y);
D.sub(a,b,&x,ch);
第4题:
在窗体上画一个名称为CoilTlilandl的命令按钮,然后编写如下事件过程: Private Sub command1 Click() Dim m As Integer, i As Integer, x(3)As Integer For i=0 To 3:x(i)=i:Next i For i = 1 To 2: Call sub1(x,i):Next i For i = 0 To 3: Print x(i);: Next i End Sub Private Sub sub1(a()As Integer,k As Integer) Dim i As Integer Do a(k)=a(k)+a(k+1) j = j + 1 Loop While j < 2 End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是
A.0 3 7 5
B.0 1 2 3
C.3 2 4 5
D.0 5 8 3
第5题:
Private Sub Commandl Click()
Dim i As Integer, j As Integer
Dim a (10,10)As Integer
For i=1 To 3
For j= i To 3
a(i,j)=(i-1)*3+j
Print a (i,j);
Next j
Next i
End Sub
程序运行后,单击命令按钮,窗体上显示的是( )。
第6题:
下面程序的输出结果是。 Private Sub Commandl_Click ch$=“ABCDEF” proc ch:Print ch End Sub Private Sub proc(ch As Stnng) s=“” For k=Len(ch) TO 1 Step -1 s=s&Mid(ch,k,1) Next k ch=s End Sub A.ABCDEF B.FEDCBA C.A D.F
第7题:
有程序如下: Sub subP(b() As Integer) For i=1 To 4 b(i)=2*i Next i End Sub Private Sub Command1_Click() Dim a(1 To 4) As Integer a(1)=5 a(2)=6 a(3)=7 a(4)=8 subP a() For i=1 To 4 Print a(i) Next i End Sub运行上面程序,单击命令按钮,输出结果为______ 。
A. 2 4 6 8
B.5 2 2 2
C.10 12 14 16
D.出错
第8题:
以下能够正确计算n!的程序是( )。
A.Private Sub Commandl_C1ick()
B.hiVate Sub Commandl_C1ick() n=5:x=1 n=5:x=1:i=1 DO DO X=x*1 X=X*1 i=i+1 i=i+1 Loop while i<n Loop While<n Print x Ptinte x End Sub End Sub
C.Private Sub Commandl_Click ()
D.Pdvate Sub Commandl C1ick() n=5:X=1:i=1 n=5=:x=1:i=1 DO DO X=X*1 X=X*1 i=i+1 i=i+1 Loop While i>n Print x Print x End Sub End Sub
第9题:
下列程序运行后的输出结果是______。
Private Sub f(k,s)
s=1
For j=1 To k
s=s*j
Next
End Sub
Private Sub Command1_Click()
Sum=0
For i=1 To 3
Call f(i,s)
Sum=Sum+s
Next
Print Sum
End Sub
第10题:
4种化合物:①CH3—CH2—CH2—COOH,②CH3—CH2—CHOH—COOH,③CH3—CHOH—CH2—COOH,④CH3—CH2—CO—COOH,酸性由强至弱的顺序是()。
第11题:
sub(1,97);
sub(2,'97');
h=sub(3,'a');
sub(4,a);
第12题:
Compilation will fail.
Compilation will succeed and the program will print “0”
Compilation will succeed and the program will print “1”
Compilation will succeed and the program will print “2”
第13题:
下面程序的运行结果是( )。
include<stdio.h>
define SlZE 12
main()
{char s[SIZE];int i;
for(i=0;i<SIZE;i++) s[i]='A'+i+32;
sub(s,5,SIZE-1);
for(i=0;i<SIZE;i++)printf("%c",s[i]);
printf("\n");}
sub(char *a,int t1,int t2)
{ char ch;
while(t1<t2)
{ ch=*(a+t1);
*(a+t1)=*(a+t2);
*(a+t2)=ch;
t1++;t2--;
}
}
第14题:
执行下面的程序,单击命令按钮后,窗体中的输出结果是 ______。 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
第15题:
执行下面的程序,消息框的输出结果是 【 】。
Option Basel
Private Sub Commandl Click()
Dim a(10),P(3)As Integer
k=5
For i=1 To 10
a(i)=i
Next i
For i=1 To 3
P(i)=a(i*i)
Next i
For i=1 To 3
k=k+p(i)*2
Next i
MsgBox k
End sub
第16题:
以下能够正确计算1+2+3+…+10的程序是
A.Private Sub Command1_Click() Sum=0 ForI=1 To 10 Sum=Sum+I Next I Print Sum End Sub
B.Private Sub Command1_Click() Sum=0,I=1 Do While I<=10 Sum=Sum+I I=I+1 Print Sum End Sub
C.Private Sub Command1_Click() Sum=0: I=1 Do Sum=Sum+I I=I+1 Loop While I<10 Print Sum End Sub
D.Private Sub Command1_Click() Sum=0: I=1 Do Sum=Sum+I I=I+1 Loop Until I<10 Print Sum End Sub
第17题:
执行以下程序后输出的是。 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
第18题:
下面程序的运行结果是#include #define SIZE 12sub(char *a,int t1,int t2) { char ch; while(t1<t2) { ch=*(a+t1); *(a+t1)=*(a+t2); *(a+t2)=ch; t1++;t2--; }} main() { char s[SIZE]={’A’,’B’,’C’,’D’,’E’,’F’,’G’,’H’,’I’,’J’,’K’,’L’}; int i; sub(s,7,SIZE-1); for(i=0;i<SIZE;i++) printf("%c ",s[i]); printf("\n");}
第19题:
编写如下事件过程: Option Base 1 Private Sub Form Click() Dim x1()As Integer Dim i As Integer Dim s As Integer ReDim x1(3) For i = 1 To UBound(x1) x1(i)=i + 1 Next i Call sub1(x1) For i = 1 To UBound(x1) s = s + x1(i) Next i Print s End Sub Private Sub sub1(n()As Integer) Dim i As Integer ReDim Preserve n(5) For i = 3 To 5 n(i)=n(i-1)*2 Next i End Sub 程序运行后,单击窗体,则窗体上显示的内容是
A.6
B.12
C.24
D.47
第20题:
阅读程序 SUB P(B( ) AS INTEGER) FOR I=1 TO 4 B(I) =2*I NEXT I END SUB PRIVATE SUB COMMAND1_CLICK( ) DIM A( 1 TO 4) AS INTEGER A(1)=5 A(2) =6 A(3) =7 A(4) =8 P A( ) FOR I = 1 TO 4 MSGBOX A(I) NEXT I END SUB 运行上面的程序,单击命令按钮COMMAND1后,消息框4次输出的内容分别是( )。
A.出错
B.10, 12, 14, 16
C.5, 6, 7, 8
D.2, 4, 6, 8
第21题:
class Super { public int i = 0; public Super(String text) { i = 1; } } public class Sub extends Super { public Sub(String text) { i = 2; } public static void main(String args[]) { Sub sub = new Sub(“Hello”); System.out.println(sub.i); } } What is the result?()
第22题:
0
1
2
Compilation fails.
第23题:
<p>I<sub>2</sub>=I<sub>3</sub></p>
<p>I<sub>2</sub>=4I<sub>3</sub></p>
<p>I<sub>2</sub>=2I<sub>3</sub></p>
<p>I<sub>3</sub>=4I<sub>2</sub></p>