R
|
S B. T=R∪S C. T=R×S D. T=R/S [单项选择]在Visual FoxPro中,表RSDA已经打开,并建立bh.idx、xm.idx、zw.idx和gz.idx的索引文件,这些索引的索引表达式分别是编号、姓名、职务和基本工资字段。执行SET INDEX TO bh,xm,zw,gz后,若再执行SET ORDER TO 0,则主控索引为______。
A. bh B. xm C. gz D. 没有 [单项选择]在Visual FoxPro中,表RSDA已打开,并建立了bh.idx、xm.idx、zw.idx和gz.idx索引文件,这些索引的索引表达式分别是编号、姓名、职务和基本工资字段。执行SET INDEX TO bh,xm,zw,gz后,若再执行SET INDEX TO命令,则主索引文件为______。
A. bh B. xm C. zw D. 没有 [单项选择]设有如下程序文件:
SET TALK OFF
CLEAR
DIMENSION a(2,3)
i=1
DO WHILE i<=2
j=1
DO WHILE j<=3
a(i,)=i+j
a(i,j)
j=j+1
ENDDO
i=i+1
ENDDO
SET TALK ON
RETURN
执行此程序,程序的运行结果为( )。
A. ARCHIVE B. CODE C. ALT D. ALIGN [单项选择]设有如下程序:
public class Sun public static void main(String args[ ]) int x, y; x-4; y=0; if(Math.pow(x,2)==16) y=x; if(Math.pow(x,2)<15) y=1/x; if(Math.pow(x,2)>15) y=(int)Math.pow(x,2)+1; System.out.println(y); 程序的运行结果是( )。 A. 4 B. 17 C. 18 D. 0.25 [单项选择]设有如下程序
Option Base 1 Private Sub Command1_Click( ) Dim a(10)As Integer Dim n As Integer n=lnput Box(“输入数据”) If n<10 Then Call GetArray(a,n) End If End Sub Private Sub GetArray(b( )As Integer,n As Integer) Dim c(10)AsInteger j=0 For i=1 To n b(i)=CInt(Rnd( )*100) If b(i)/2=b(i)/2 Then j=j+1 c(j)=b(i) End lf Next Print j End Sub 以下叙述中错误的是 A. 数组b中的偶数被保存在数组c中 B. 程序运行结束时,在窗体上显示的是c数组中元素的个数 C. GetArray过程的参数n是按值传送的 D. 如果输入的数据大于10,则窗体上不显示任何信息 [单项选择]设有如下程序: public class Sun { public static void main(String args[ ]) { int x, y; x-4; y=0; if(Math.pow(x,2)==16) y=x; if(Math.pow(x,2)<15) y=1/x; if(Math.pow(x,2)>15) y=(int)Math.pow(x,2)+1; System.out.println(y); } } 程序的运行结果是( )。
A. 4 B. 17 C. 18 D. 0.25 [填空题]设有一学生关系:S(XH,XM,XB,NL,DP)。在这个关系中,XH表示学号,XM表示姓名,NL表示年龄,DP表示系部。查询学生姓名和所在系这两个属性上的投影操作的关系运算式是【 】。
[单项选择]设有如下程序: Option Base 1 Private Sub Command1 Click( ) Dim a(10) As Integer Dim n As Integer n=InputBox(“输入数据”) If n< 10 Then Call,GetArray(a, n) End If End Sub Private Sub GetArray(b( ) As Integer, n As Integer) Dim c(10)As Integer j=0 For i=1 To n b(i)=CInt(Rnd( )*100) If b(i) /2 =b(i) /2 Then j=j + 1 c(j) = b(i) End If Next Print j End Sub 以下叙述中错误的是
A. 数组b中的偶数被保存在数组c中 B. 程序运行结束时,在窗体上显示的是c数组中元素的个数 C. GetArray过程的参数n是按值传送的 D. 如果输入的数据大于10,则窗体上不显示任何信息 [单项选择]设有如下程序:
Private Static Function Fac(n As Integer)As Integer Dim f As Integer f=f+n Fac=f End Function Private Sub Form_Click( ) Dim I As Integer For 1=2 To 3 Print"#";I&“=”&Fac(1) Next I End Sub 程序运行后,单击窗体,在窗体上显示的是 A. #2=2 B. #2=2 C. #;2=2 D. #;2=2 [填空题]
设有如下程序: [单项选择]设有如下程序:
#include <iostream> using namespace std; class A public: int i; display( ) cout<<"class A/n"; ; class B public: int i; display( ) cout<<"class B/n"; ; class C : public A, public B int j; public: int i; show ( ) j = i * i; display( ); ; int main( ) C demo; demo.show( ); return O; 则主程序运行时将( )。 A. 因为变量i的重复定义而报错 B. 因为对象demo间接调用display()函数时产生二义性而报错 C. 因为类定义的语法错误而不能运行 D. 没有语法错误,能够正常输出结果 [填空题]设有如下程序
Private Sub Form Click( ) Dim a As Integer, b As Integer a=20: b=50 p1 a, b p2 a, b p3 a, b Print "a="; a, "b="; b End Sub Sub p1(x As Integer, ByVal y As Integer) x = x+10 y = Y+20 End Sub Sub p2(ByVal x As Integer, y As Integer) x = x+10 y = y+20 End Sub Sub p3(ByVal x As Integer, ByVal y As Integer) x = x+10 y = y+20 End Sub 该程序运行后,单击窗体,则在窗体上显示的内容是:a==______和b=______。 [单项选择]设有如下程序: Option Base 1 Private Sub Command1_Click( ) Dim a(10) As Integer Dim n As Integer n=InputBox(“输入数据”) If n<10 Then Call GetArray(a,n) End If End Sub Private Sub GetArray(b( )As Integer,n As Integer) Dim c(10) As Integer j=0 For i=1 To n b(i)=CInt(Rnd( )*100) If b(i)/2=b(i)/2 Then j=j+1 c(j)=b(i) End If Next Print j End Sub以下叙述中错误的是
A. 数组b的偶数被保存在数组c中 B. 程序运行结束时,在窗体上显示的是c数组中元素的个数 C. GetArray过程的参数n是按值传送的 D. 如果输入的数据大于10,则窗体上不显示任何信息 [单项选择]设有如下程序:
Private Sub Command1_Click( ) Dim sum As Double, x As Double sum=0 n=0 For i=1 To 5 x=n/i n=n+1 sum=sum+x Next End Sub 该程序通过For循环计算一个表达式的值,这个表达式是______。 A. 1+1/2+2/3+3/4+4/5 B. 1+1/2+2/3+3/4 C. 1/2+2/3+3/4+4/5 D. 1+1/2+1/3+1/4+1/5 [单项选择]设有如下通用过程:
Public Function f(x As Integer) Dim y As Integer x = 10: y = 5 f = x * y End Function 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click( ) Static x As Integer x = 2:y = 6 y = f(x) Print x; y End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是 A. 2 6 B. 10 5 C. 10 50 D. 6 10 [填空题]设有如下程序
Private Sub Search(a( )As Variant,ByVa1 key As Variant,index%) Dim I% For I=LBound(a) To UBound(a) If key=a(1) Then index=I Exit Sub End If Next I index=I End Sub Private Sub Form_Load( ) Show Dim b( ) As Variant Dim n As Integer b = Array(1,3,5,7,9,11,13,15) Call Search(b, 11 ,n) Print n End Sub程序动行后,输出结果是 【15】 。 我来回答: 提交
|